Simulink Test



Simulink Test

Develop, manage, and execute simulation-based tests


Simulink Test provides tools for authoring, managing, and executing systematic, simulation-based tests of models, generated code, and simulated or physical hardware. It includes simulation, baseline, and equivalence test templates that let you perform functional, unit, regression, and back-to-back testing using software-in-the-loop (SIL), processor-in-the-loop (PIL), and real-time hardware-in-the-loop (HIL) modes.

With Simulink Test you can create nonintrusive test harnesses to isolate the component under test. You can define requirements-based assessments using a text-based language, and specify test input, expected outputs, and tolerances in a variety of formats, including Microsoft® Excel®. Simulink Test includes a Test Sequence block that lets you construct complex test sequences and assessments, and a test manager for managing and executing tests. Observer blocks let you access any signal in the design without changing the model or the model interface. Large sets of tests can be organized and executed in parallel or on continuous integration systems. 

You can trace tests to requirements (with Simulink Requirements™) and generate reports that include test coverage information from Simulink Coverage™

Support for industry standards is available through IEC Certification Kit (for IEC 61508 and ISO 26262) and DO Qualification Kit (for DO-178).

Author Tests

Create tests for functional, unit, requirements-based, and regression testing.

Regression, Back-to-Back, and Requirements-Based Test Templates

Simulation tests verify that a simulation runs without errors, including assessments defined in the model. Baseline tests compare simulation output to a defined dataset. Equivalence tests compare the simulation output of two simulations.

Templates for creating test cases: simulation, baseline, and equivalence tests.

Define Test Data Using Multiple Sources

Input data, expected outputs, and tolerances for test scenarios can be specified using MAT-files or Excel spreadsheets. You can:

  • Author input data graphically using Signal Editor blocks.
  • Define programmatic test input sequences using the Test Sequence block.
  • Automatically generate test inputs using Simulink Design Verifier™.

Use multiple formats to define test inputs, outputs, or parameters.

Isolate Components for Testing with Test Harnesses

Test harnesses provide an integrated simulation environment that isolates the Simulink® model or model component. It separates the testing environment from the design. You can run test-specific simulations on models or model components while synchronizing design changes between the model and the test harness.

Isolate a subsystem for testing with a test harness.

Author Logical Tests with Assessments and Observers

Express textual requirements as executable assessments with precise semantics. Assess simulation behavior of complex test sequences and assessments. Capture signals for assessment without perturbing the design model.

Temporal Assessments for Requirements Verification

Requirements for a design may include timing-dependent logic that is difficult to formalize in a test. You can author tests with temporal assessments with precise semantics in a natural language format that accurately models complex timing-dependent behavior with conditions, events, signal values, and delays.

Author Test Sequence and Assessments

You can 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. 

Create step-based and temporal test sequences.

Observe Signals Without Changes to Model

With observers, you can debug and test Simulink signals without adding additional ports, blocks, connections, or interfaces that are only for testing. You can create a separate verification model to verify your system design.

Manage Test Plans and Test Execution

The test manager helps you author, execute, review, and organize test cases and test suites. You can test your model in previous versions of MATLAB by selecting previous releases in the test case. To help you assess the extensiveness of your tests, collect coverage metrics.

Support for All Simulation Modes

Execute tests in normal simulation mode, accelerator mode, rapid accelerator model, software-in-the-loop (SIL) mode, processor-in-the-loop (PIL) mode, or real-time mode with Simulink Real-Time™.

Perform HIL testing with Simulink Real-Time.

Multiple Release Support

You can run test cases using multiple MATLAB releases, starting with R2011b, to allow you to execute your model in its production version but use the latest verification features of Simulink Test.

Execute test cases with older MATLAB releases.

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, you can generate test cases for missing coverage by using Simulink Design Verifier.

Aggregate coverage for tests and generate reports.

Results and Test Management

Simulink Test provides tools to simplify the debugging, analysis, and reporting of test results.

Visualize Test Results, Debug Errors, and Update Tests

Simulink Test graphically identifies signals that do not meet tolerance specifications and determines a pass/fail result. You can examine the simulation outputs and logged signals along with the defined expected outputs and update baseline data if deviations are acceptable.

Visualize and debug test results in Test Manager.

Manage and Archive Test Results

Simulink Test displays a summary and details of tests that have been executed. A summary page for each test result shows the simulation output, baseline or equivalence comparisons, and the outcome of the test: passed, failed, or untested. To share the results with others, you can export test results to a file, which can be reviewed later in the test manager.

Graphically view test results with tolerances.

Generate Reports

To archive the results in a document, you generate a report, which can include the test outcome, test summary, and any criteria used for test comparisons. Standard reports can be generated in HTML, PDF, and DOCX formats or customized using Simulink Report Generator™.

Generate reports to document test results.

Automate Testing

You can increase throughput for large test suites, iterations, and large Simulink models by using parallel execution.

Test Scripts and Batch Workflows

Tests can be executed individually or in a batch to automate testing and set up a standardized testing environment. You can programmatically create a test case, specify test case criteria, run tests, and generate results.

Customize and automate testing with scripts.

Continuous Integration

You can run model tests using MATLAB Unit Test, allowing you to integrate within continuous integration (CI) systems such as Jenkins™. You can execute model tests together with MATLAB Unit Test scripts, functions, and classes.

Example workflow for continuous integration.

Scale with Parallel Execution

For testing of large or complex Simulink models, you can speed up test execution by running tests in parallel if you have Parallel Computing Toolbox™

Run tests in parallel cores.

Latest Features

Temporal Assessments for Requirements Verification

Express textual requirements as executable assessments with precise semantics.

Observer Blocks

Capture signals without perturbing design model

Test Scenario Authoring with Signal Editor Block

Test and iterate using signal editor scenarios

Test Sequence Editor Improvements

Navigate test sequence steps using a summary view and find text in test sequences

Test Coverage Filters

Justify or exclude model objects with a coverage filter

Testing with MATLAB Unit Test

View and investigate results from MATLAB Unit Tests in Test Manager

Excel-Based Testing

Define test cases in Excel spreadsheets

See release notes for details on any of these features and corresponding functions.


30 日間の無料評価版はこちら



MATLAB および Simulink のアカデミック版の入手