Main Content

Generating a Test Results Report

Report test results for a baseline test.

This example shows how to generate a test results report from the test manager using a baseline test case. The model used for this example is sltestTestManagerReportsExample.

Load and run the test file

Load and run the test file programmatically using the test manager. The test file contains a baseline test case that fails when it is run. The baseline criteria specified in the baseline test case does not match the model simulation, which makes the test case fail.

exampleFile = 'sltestTestManagerReportsTestSuite.mldatx';
baselineObj =;

Generate the report

Generate a report of the test case results using the results set object. The report is saved as a ZIP and shows all test results. The report opens when it is completed.,'',...

View the report when it is finished generating. In the folder, open the report.html file. Notice that the overall baseline test case fails. The signals in baseline criteria do not match, which causes the test failure. You can view the signal comparison plots in the report to verify the failure.


Related Topics