Result reports contain report overview information, the test environment, results
summaries with test outcomes, comparison criteria plots, and simulation output
plots. You can customize the information included in the report, and you can save
the report in three different file formats: ZIP (HTML)
,
DOCX
, and PDF
.
In the Test Manager, in the Results and Artifacts pane, select results for a test file, test suite, or test case.
Note
You can create a report from multiple result sets, but you cannot create a report from multiple test files, test suites, or test cases within results sets.
In the toolstrip, click Report.
Enter the title page information and specify the information you want to include in the report. To enable the option to specify the number of plots per page, select Plots for simulation output and baseline.
Select the File Format to use for the generated file.
Click Create.
You can generate a report every time you run a test case in a test file, using the same report settings each time. To generate a report each time you run the test, set options under Test File Options. These settings are saved with the test file.
In the Test Browser pane, select the test file whose report options you want to set.
Under Test File Options, select Generate report after execution. The section expands, displaying the same report options you can set using the dialog box.
Set the options. To include figures generated by callbacks or custom criteria, select MATLAB figures. For more information, see Create, Store, and Open MATLAB Figures.
Store the settings with your test file. Save the test file.
If you want to generate a report using these settings, select the test file and run the test.
If you have a MATLAB® Report Generator™ license, you can create reports from a Microsoft® Word template. The report can be a Microsoft Word or PDF document.
The report generator in Simulink® Test™ fills information into rich text content controls in your Microsoft Word template document. For more information on how to use rich text content controls or customize part templates, see the MATLAB Report Generator documentation, such as Add Holes in a Microsoft Word Template (MATLAB Report Generator).
For a sample template, go to the path:
cd(matlabroot);
cd('help\toolbox\sltest\examples');
examples
folder, open the file
Template.dotx
.In the Microsoft Word template, you can add rich text content controls. Each Simulink Test report section can be inserted into the rich text content controls. The control names are:
ChapterTitle
— report title
ChapterTestPlatform
— version of
MATLAB used to execute tests
ChapterTOC
— test results table of
contents
ChapterBody
— test results
For example, the chapter title rich text content control appears in the Microsoft Word template as:
To change the control name, right-click the rich text content
control and select Properties. Specify the control
name, ChapterTitle
or other name, in the
Title and Tag field.
To generate a report from the Test Manager using a Microsoft Word template:
In the Test Manager, select the Results and Artifacts pane.
Select results for a test file, test suite, or test case.
In the toolstrip, click Report.
Enter the title page information and specify the information you want to include in the report.
Select DOCX
or PDF
for the
File Format.
Specify the full path and file name of your Microsoft Word template in the Template File field.
Click Create.
If you have a MATLAB
Report Generator license, you can create reports from a PDF or HTML template by
using a PDFTX
or HTMTX
file. To generate a
report from the Test Manager using a PDF or HTML template:
In the Test Manager, select the Results and Artifacts pane.
Select results for a test file, test suite, or test case.
In the toolstrip, click Report.
Enter the title page information and specify the information you want to include in the report.
Select ZIP
or
PDF
for the File
Format. Selecting ZIP
generates an HTML report.
Specify the full path and file name of your template in the
Template File field. For PDF, use a
PDFTX
file. For HTML, use an
HTMTX
file. For more information on creating
templates, see Templates (MATLAB Report Generator).
Click Create.