Home / eaTeamworks Help / Common / Testing Scripts
Testing Scripts
Writing and testing Model Expert and eaDocX scripts is difficult: the EA interface is very large and complex, and the JavaScript environment does not provide much help when debugging scripts. This is why you should only use scripting when the base product function really is is not enough for your requirements.
Here are some tips for writing and debugging scripts
Model Expert scripts
Running the script directly
If there is an error in your script code for a Model Expert script, then this will appear in the ‘Progress’ area of the Check Diagram page:
To get exact details of the error in the script, look at the eaTeamWorks log.
(to enable the logging function, choose Specialize/eaTeamWorks from the EA main menu, and eaTeamWorks settings. Then switch logging to ‘ON’ and choose where you want to put the eaTeamWorks log file)
In the log file, running your script may create lots of data, but they key part will look like:
info - 14/04/2025 - 09:42:54 - ERROR running script BPMNActivity ... ... --- Script error details follow --- SyntaxError: Unexpected identifier 'is' at Script:26:7 -> this is nonsense code - -
(this was a deliberately injected error)
This shows that the error was in a script called ‘BPMNActivity’ and was at line 26, position 7.
Running your script from the Script Tester
eaTeamWorks now also contains a script testing application, where you can run scripts against elements and diagrams in a more controlled way.
From the EA main manu, choose Specialize/eaTeamWorks/Test a Script.
(to be completed)