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.

Access

Ribbon

Code > Build and Run > Test

Execution Analyzer Window

ToolBar > Run Test Script

Tasks

Task

Details

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.

Set Up Unit Testing Add Testing Command

View Results

The results of xUnit tests are displayed in the System 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.

Record Test Results Show Test Scripts Compartment