Documentation

Organize Test Sequences

Compared to using timeseries data, using the Test Sequence block to define your test inputs has these advantages:

  • You can organize test scenarios in test step groups, and use hierarchy levels to isolate test scenario execution.

  • You can isolate model functionality by separating signal commands into distinct test steps.

  • Steps can execute in response to the model, using logical conditions.

  • You can author assessments for specific test conditions.

  • You can concisely express signal patterns, such as waveforms, using output commands.

Before creating test steps, consider the test sequence organization. Clear organization helps communicate the test sequence intent and structure.

Consider the case of verifying a simple subsystem. The subsystem consists of a switch controlled by the Engage signal.

The goal of the test is to complete a simple verification of the switch function. The test does not cover all objectives for full verification, but covers a simple design check. Check that the output equals Input 1 when the control is engaged, and Input 2 when the control is not engaged. You organize a test sequence into an initialization step and two test scenarios. Each scenario sets Input 1 and Input 2, then sets Engage, then assesses the switch output:

  1. Initialize the signals

  2. Scenario 1

    1. Set the signal levels

    2. Engage the control

    3. Assess the result

  3. Scenario 2

    1. Set the signal levels

    2. Engage the control

    3. Assess the result

In the test sequence editor, the step hierarchy follows the hierarchy of the scenario outline:

Note

To execute test steps sequentially without using a logical transition condition, use the condition true. true moves the sequence to the next step after the current step.

Was this topic helpful?