Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Run Unit Tests

On running a test script you generate test results that are stored as Test Cases against the Classes being tested.



Code > Build and Run > Test    or

Execute > Analyzer Scripts > (The 'Run Test Script' icon on the toolbar of the Execution Analyzer window.)




See also

Run Tests

Select the appropriate Package in the Project Browser.

Select the 'Run Test Script' option to run the test script you previously set up for that Package, in the Execution Analyzer.

Add Testing Command Set Up Unit Testing

View Results

The results of xUnit tests are displayed in the Output window, identifying which tests have run and which of these have failed.

The results also show which method failed and the file and line number the failure occurred at.

Double-click on an error message; Enterprise Architect opens the editor to that line of code, enabling you to quickly find and fix the error.

Enterprise Architect also records the run status of each test against the Class being tested; these are stored in the element Test Cases.

A diagram containing the Class can be set to display these Test Cases, by exposing the test scripts compartment on the diagram elements.

Show Test Scripts Compartment Record Test Results