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.
|On this page…|
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.
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.
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.
Use the systemtest function to open the test.