Simulink Coverage

Measure test coverage in models and generated code

 

Simulink Coverage™ performs model and code coverage analysis that measures testing completeness in models and generated code. It applies industry-standard metrics such as decision, condition, modified condition/decision coverage (MC/DC), and relational boundary coverage to assess the effectiveness of simulation testing in models, software-in-the-loop (SIL), and processor-in-the-loop (PIL). You can use missing coverage data to find gaps in testing, missing requirements, or unintended functionality.

Simulink Coverage produces interactive reports showing how much of your model, C /C++ S-functions, MATLAB® functions, and code generated by Embedded Coder® has been exercised. You can highlight coverage results in blocks and subsystems to visualize gaps in testing. To assess testing completeness, you can accumulate coverage data from multiple test runs, as well as view coverage achieved through unit and system tests. Coverage outcomes can be traced to requirements and tests. You can apply filters to exclude blocks from coverage and justify missing coverage in reports.

Support for industry standards is available through DO Qualification Kit and IEC Certification Kit.

Get Started:

Measure Model and Code Coverage

Assess completeness of your testing by measuring model elements and C/C++ code exercised during simulation.

Model Coverage

Measure how much of your design is covered by simulation testing to assess testing effectiveness and completeness. Analyze coverage collected during requirements-based testing to determine if there are any gaps in testing, missing requirements, or unintended functionality.

Review model coverage results within the Simulink Editor.

Code Coverage

Measure coverage for software-in-the-loop (SIL) and processor-in-the-loop (PIL) tests of code generated with Embedded Coder or for any code called within Simulink models using S-functions, custom code in Stateflow® charts, and C Caller blocks.

View coverage of code called from a C Caller block.

Coverage Metrics

Measure model and code coverage for a variety of metrics, including decision, condition, MC/DC, relational boundary, and signal range.

Select from various coverage metrics, including MC/DC.

Explore Results and Generate Reports

Accumulate and report coverage results across multiple simulation runs. Reconcile missing coverage.

Manage and View Accumulated Coverage Results

Aggregate coverage from multiple simulations. View system test coverage achieved from unit tests.

Analyze coverage results for unit and system tests.

Generate Coverage Reports

Generate detailed reports that include accumulated coverage results on selected metrics. View requirements traceability details for model elements and tests.

View requirements traceability data in a coverage report. 

Reconcile Missing Coverage

Models may contain constructs that prevent full test coverage. Filtering these constructs from coverage recording and reporting lets you focus on other aspects of missing coverage that can and should be tested.

Add coverage filter rules in the Filter Editor.

Latest Features

Coverage for Requirements-Based Tests

Scope model coverage results to linked requirements in the Test Manager in Simulink Test

Manage Multiple Coverage Filters

Apply multiple coverage filters to results

Requirements-to-Test-Case Traceability

View Simulink Requirements links and coverage details for each Simulink block when generating coverage reports from Simulink Test Manager

Unit-to-System Test Coverage Aggregation

View system test coverage achieved from unit tests in new Aggregated Tests section of coverage report

Test Case Traceability of Coverage Results

Trace coverage results to relevant simulations in Simulink Test Manager and Coverage Results Explorer

Coverage App in Simulink Toolstrip

Access common coverage features from the new Simulink Toolstrip, including model highlighting, coverage details, and report generation

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

How to Use Simulink for ISO 26262 Projects

Learn how Model-Based Design with Simulink enables you to design and test your embedded automotive system under a wide range of driving conditions and fault scenarios long before you go to the proving grounds.