Simulink Test

Graphic showing a system under test in the middle, list of inputs on the left, parameters at bottom and asssements on the right.

Author Requirements-Based, Back-to-Back, and Regression Tests

Use test templates to create simulation, baseline, and equivalence tests. Define test data with multiple formats: MAT-files, Excel spreadsheets, MATLAB code, graphically using Signal Editor blocks, programmatic test input sequences using the Test Sequence block, or automatically generate test inputs using Simulink Design Verifier. 

RoadRunner Scenario with vehicle approaching an intersection on left and the Simulink Test Test Manager with a RoadRunner test case on right.

Create and Run RoadRunner Test Cases

You can leverage the power of Simulink Test and RoadRunner to create comprehensive test scenarios that simplify the process of testing agents on ego vehicles within road simulations, enhancing the efficiency and effectiveness of your testing workflow. You can create and run RoadRunner test cases in the Test Manager using a single Simulink model to test a RoadRunner scenario.

Two loops are shown side by side.

Automate Testing with Continuous Integration

Increase throughput for large test suites, iterations, and large Simulink models by using parallel execution. Tests can be executed individually or in a batch to automate testing and set up a standardized testing environment. Run model tests using MATLAB Unit Test, enabling you to integrate within continuous integration (CI) systems such as Jenkins™.

Plots of signals from the results of testing in the Simulation Data Inspector

Execute Tests, View Results, and Debug

Execute and debug tests in normal simulation, accelerator, rapid accelerator, software-in-the-loop (SIL), processor-in-the-loop (PIL), or real-time hardware-in-the-loop (HIL) mode with Simulink Real-Time. Use Simulink Test Support Package for ASAM® XIL Standard to control third-party HIL hardware with Simulink Test.

The Create Test Harness dialog for the component under test and the test harness with a test sequence block, test assessment block and the component under test

Isolate Components for Unit Testing

Test harnesses provide an integrated simulation environment that isolates the Simulink model or model component. Run test-specific simulations on models or model components while synchronizing design changes between the model and the test harness. With observers, debug and test Simulink signals without adding ports, blocks, connections, or interfaces that are only for testing.

Test Sequence Editor shows columns with steps, transition and next steps for a sequence.  Test harness with Test Sequence block is also visible.

Author Test Sequence and Assessments

Author tests and assess simulation results with step-based and temporal test sequences using a subset of MATLAB language features, including temporal operators, signal generators, and conditional constructs. 

Temporal Assessment editor in the Test Manager shows

Verify Temporal Requirements

Author tests with temporal assessments with precise semantics in a natural language format. These tests accurately model complex timing-dependent behavior with conditions, events, signal values, and delays.

Generate reports to document test results.

Generate Test Reports and Archive Test Results

Simulink Test displays a summary and details of tests that have been executed. To share the results with others, export test results to a file, which can be reviewed later in the test manager. Generate reports that include the test outcome, test summary, and any criteria used for test comparisons. These reports can be customized using Simulink Report Generator.

Image of aggregated coverage section from test manager showing coverage with an arrow pointing to coverage report.

Measure Model and Code Coverage

Coverage metrics, such as decision, condition, modified condition/decision coverage (MC/DC), and relational boundary coverage, can be collected with Simulink Coverage. From the coverage results in the test manager, generate test cases for missing coverage by using Simulink Design Verifier.

“Model-Based Design helped us apply the design and verification methods required by ISO 26262, including back-to-back verification and test coverage assessment. In particular, the automated test cases and reports in Simulink Test contributed significantly to reduced testing efforts.”