Executing Tests

When you run a SystemTest TEST-file from the SystemTest desktop or using the strun MATLAB command, it executes using the test structure you defined using test elements. The test structure is defined in three sections.

Pre Test runs once prior to Main Test and can be used for:

  • Initializing variables
  • Opening a model
  • Accessing system resources
  • Initializing external test equipment

Main Test runs one or more times based on the number of iterations defined by the test vectors. SystemTest will execute each test element in Main Test in sequence once during each iteration.

Post Test runs once after all Main Test iterations are complete or when a test stops during execution. It can be used for:

  • Cleaning up your workspace
  • Closing a model
  • Releasing system resources
  • Returning external test equipment to a safe state

The Run Status pane indicates which section is executing and how long the test has been running, and provides cumulative Pass/Fail status for the test iterations. After the test is complete, the pane displays the location of any generated files, any error messages generated during the test, and the start and stop time.

When used with Simulink Verification and Validation (available separately), SystemTest lets you view model coverage reports. These reports let you see how multiple iterations increase model coverage. Results are reported in HTML documents using industry-standard metrics for structural coverage.

Next: Distributing a Test

Try SystemTest

Get trial software

Auf Nummer sicher gehen – Standards für sicherheitsrelevante Systeme

View webinar