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.
exampleFile = 'sltestTestManagerReportsTestSuite.mldatx';
sltest.testmanager.load(exampleFile);
baselineObj = sltest.testmanager.run;
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 the test results. The report opens when it is completed.
sltest.testmanager.report(baselineObj,'baselineReport.zip',... 'IncludeTestResults',0,'IncludeComparisonSignalPlots',true,... 'IncludeSimulationSignalPlots',true,'NumPlotRowsPerPage',3);
View the report when it is finished generating. In the baselineReport.zip folder, open the report.html file.
sltest.testmanager.clear; sltest.testmanager.clearResults;