Using the Signal Builder Block and Generating Model Coverage Reports

This example shows how to use the model coverage options in the Simulink Element with the Signal Builder block in SystemTest. The demosystest_sigbldr_model Simulink model is run using the different signal groups in the Signal Builder block. Model coverage data for each test condition is accumulated and used to generate a model coverage report at the end of the test.

Using the Signal Builder Block

The Simulink element in the Main Test runs the following model:


The Signal Builder block test cases are run with the test cases within the Test Vector, sigBldrTestCases.

Accumulating Model Coverage Data

Select the Model Coverage tab on the Simulink Element to view the available options for model coverage. The 'Enable model coverage' box is checked which will result in the generation of the selected metrics for the model.

In this test, the percent coverage of the Look-up table metric for the demosystest_sigbldr_model/Threshold Calculation/interp_down block is mapped to the SystemTest variable, coverage, and plotted.

Generating the Model Coverage Report

After the test is complete, click on the hyperlink in the Run Status pane, Launch Model Coverage Report for 'Run the model', to view the coverage report.

Opening the Test

Use the systemtest function to open the test.


Open the example in the SystemTest desktop.Open the example in the SystemTest desktop.

Was this topic helpful?