Prev | Next |
Test Scripts
These sections explain how to configure the 'Test' page of an Analyzer Script for performing unit testing on your code. Most users will apply this to NUnit and JUnit test scenarios. Enterprise Architect accepts the output from these systems and can automatically add to and manage each unit test case history. To view the case history, you would press while selecting the test case Class element.
Access
On the Execution Analyzer window, either:
- Locate and double-click on the required script and select the 'Test > Test' page or
- Click on in the window Toolbar, select the Package in which to create a new script, and select the 'Test > Test' page
Ribbon |
Code > Configure > Analyzer > Edit Analyzer Scripts Execute > Run > Analyzer |
Context Menu |
Project Browser | Right-click on Package | Execution Analyzer |
Keyboard Shortcuts |
|
Actions
Action |
Description |
See also |
---|---|---|
Execute Command As: |
Process Enter the path to a program or batch file to run, followed by any parameters.
Batch File When using this option you can enter multiple commands that are then executed as a single script in a command console; you have access to any environment variables available in a standard command console. |
|
Example |
NUnit "C:\Program Files\NUnit\bin\nunit-console.exe" "bin\debug\Calculator.exe" JUnit java junit.textui.Testrunner %N The command listed in this field is executed as if from the command prompt; as a result, if the executable path or any arguments contain spaces, they must be surrounded in quotes. If you include the string %N in your test script it is replaced by the fully namespace-qualified name of the currently selected Class when the script is executed. |
|
Default Directory |
Preset to the Build default directory. |
Add Commands |
Parse Output |
When a parser is selected, output of nUnit and jUnit tests can be parsed, saved and managed from the model; ( ). Be aware that output is only captured when a parser is selected. |
Locate Compiler Errors in Code |
Build First |
Select to ensure that the Package is compiled each time you run the test. |
Learn more