Create, Set Options, and Use Templates for Test Result Reports
Create a Test Results Report
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 select 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 and, if desired, change the default File Name and path.
If you created a customized report template, enter the path and name of the Template File. See Generate Reports Using Templates.
If you created a customized report class to change fonts, add tables, add model images, etc., enter the Report Class name. See the "Generate Customized Test Results Report" section of Customize Test Results Reports.
Click Create.
Save Reporting Options with a Test File
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.
Generate Reports Using Templates
Microsoft Word Format
If you have a MATLAB® Report Generator™ license, you can create reports from a Microsoft® Word template. The resulting report is a Microsoft Word document.
The report generator in Simulink®
Test™ fills information into rich text content controls in your
Microsoft Word template .dotx
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 Microsoft Word Templates (MATLAB Report Generator).
In a 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 titleChapterTestPlatform
— version of MATLAB used to execute testsChapterTOC
— test results table of contentsChapterBody
— 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
for the File Format.Specify the full path and filename of your Microsoft Word template in the Template File field.
Click Create.
PDF or HTML Formats
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
orPDF
for the File Format. SelectingZIP
generates an HTML report.Specify the full path and filename of your template in the Template File field. For PDF, use a
PDFTX
file. For HTML, use anHTMTX
file. For more information on creating templates, see Templates (MATLAB Report Generator).Click Create.
Related Examples
- Generating a Test Results Report
- Templates (MATLAB Report Generator)
- Create, Store, and Open MATLAB Figures