This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

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. Switch to a directory with write permissions.

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 = fullfile(matlabroot, ...
                       'toolbox', 'simulinktest', 'simulinktestdemos', ...
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 will show all test results. The report opens when it is completed.,'',...
    'IncludeTestResults',0, 'IncludeComparisonSignalPlots', true);

View the report when it is finished generating. 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.