Main Content

Assessments and Criteria

Logical and temporal verification, data comparison, specialized results processing

Functional testing includes assessing simulation behavior and comparing simulation data to expected results. You can assess simulation behavior by:

  • Using temporal and logical assessments in a test case.

  • Including verify statements and other operators in a Test Assessment or Test Sequence block. Use the Test Sequence block to specify a series of steps to stimulate the component or system under test. Use the Test Assessment block to assess the behavior of the component or system under test.

  • Using blocks from the Model Verification library.

You can assess simulation data by:

  • Using value or time tolerances when comparing simulation data to baseline data.

  • Using a custom criteria script to process simulation data.

For an overview of the different verification methods, see Assess Simulation and Compare Output Data.

Blocks

Observer ReferenceCreate and contain an Observer model
Observer PortWirelessly link signals to use with verification
Test SequenceCreate simulation testing scenarios, function calls, and assessments
Test AssessmentAssess simulation testing scenarios, function calls, and assessments
Sequence ViewerDisplay messages, events, states, transitions, and functions between blocks during simulation
AssertionCheck whether signal is zero

Classes

sltest.testmanager.AssessmentLogical or temporal assessment object
sltest.testmanager.AssessmentSymbolSymbol used in assessment
sltest.testmanager.TestCaseCreate or modify test case

Tools

Test ManagerModel and code testing in different execution environments, manage test suites, and analyze and report results

Test Sequence and Test Assessment Syntax Operators

verifyAssess logical expression and automatically log result
assertEvaluate logical expression and stop simulation if false
etElapsed time of test step
tElapsed time of simulation
afterElapsed time since beginning of test step
beforeElapsed time until specified time in test step
durationElapsed time since beginning of test step
hasChangedDetect data change in test step
hasChangedFromDetect data change from specified value in test step
hasChangedToDetect data change to specified value in test step
squareSquare wave test signal
sawtoothSawtooth wave test signal
triangleTriangle wave test signal
rampRamp signal for test signal generation
heavisideHeaviside step test signal
latchSave value of an expression

Topics