Package: sltest.testmanager
Superclasses:
Return and specify test file options
Get instances of sltest.testmanager.Options
to
view test file options, including report generation options. For test
files, you can also set these options. View options using:
returns
the test file options object associated with the test case, suite,
or file.obj
= getOptions(test
)
test
— Test case, suite, or file sltest.testmanager.TestCase
object | sltest.testmanager.TestSuite
object
| sltest.testmanager.TestFile
objectTest case, suite, or file, specified as an sltest.testmanager.TestCase
, sltest.testmanager.TestSuite
,
or sltest.testmanager.TestFile
object.
Author
— Report authorAuthor of the report, specified as a character vector.
CloseFigures
— Option to close figures at end of testtrue
(default) | false
Option to close figures at the end of the test, specified as true
to
close the figures and false
to leave them open.
CustomReportClass
— Custom report generation classCustom report generation class, specified as a character vector. For information, see Customize Test Results Reports.
CustomTemplateFile
— Path name of report generation custom template filePath name of report generation custom template file, specified as a character vector. For information, see Customize Test Results Reports.
GenerateReport
— Option to generate a report at end of testfalse
(default) | true
Option to generate a report at the end of the test, specified
as true
or false
.
IncludeComparisonSignalPlots
— Option to include simulation output and baseline plots in reportstrue
(default) | false
Option to include simulation output and baseline plots in report,
specified as true
or false
.
IncludeCoverageResult
— Option to include coverage results in reportsfalse
(default) | true
Option to include coverage results in reports, specified as true
or false
.
IncludeErrorMessage
— Option to include error and log messages in reportstrue
(default) | false
Option to include error and log messages in reports, specified
as true
or false
.
IncludeMATLABFigures
— Option to include figures generated from MATLAB® code in reportsfalse
(default) | true
Option to include figures generated from MATLAB code in reports, specified as true
or
false
. Specify the MATLAB code as custom criteria on the test case or as a callback on
the test case, suite, or file. You must also set
SaveFigures
to true
for this
setting to apply.
IncludeMLVersion
— Option to include MATLAB version in reporttrue
(default) | false
Option to include the MATLAB version you are running in
the report, specified as true
or false
.
IncludeSimulationMetadata
— Option to include simulation metadata in reportsfalse
(default) | true
Option to include simulation metadata in reports, specified
as true
or false
.
IncludeSimulationSignalPlots
— Option to include criteria and assessment plots in reportsfalse
(default) | true
Option to include criteria and assessment plots in reports, specified as
true
or false
.
NumPlotRowsPerPage
— Number of rows of plots to include on report pagesNumber of rows of plots to include on report pages, specified as an
integer from 1 to 4. This property is used only if the
IncludeSimulationSignalPlots
property is
true
.
NumPlotColumnsPerPage
— Number of columns of plots to include on report pagesNumber of columns of plots to include on report pages, specified as an
integer from 1 to 4. This property is used only if the
IncludeSimulationSignalPlots
property is
true
.
IncludeTestRequirement
— Option to include test requirements in reportstrue
(default) | false
Option to include test requirements in reports, specified as true
or false
.
IncludeTestResults
— Test results to include in the report'failed'
(default) |'passed'
| 'all'
|
enumerated sltest.testmanager.TestResultsIncludedInReport
valueTest results to include in the report, specified as 'failed'
, 'passed'
,
or 'all'
. You can alternatively use an enumerated
value:
sltest.testmanager.TestResultsIncludedInReport.AllTests
sltest.testmanager.TestResultsIncludedInReport.FailedOnly
sltest.testmanager.TestResultsIncludedInReport.PassedOnly
ReportFormat
— Output format for report'pdf'
(default) | 'zip'
| 'doc'
|
enumerated sltest.testmanager.ReportFileFormat
valueOutput format for report, specified as 'pdf'
, 'zip'
,
or 'docx'
. You can alternatively use an enumerated
value:
sltest.testmanager.ReportFileFormat.doc
sltest.testmanager.ReportFileFormat.pdf
sltest.testmanager.ReportFileFormat.zip
ReportPath
— Path name of file to save report toPath name of file to save report to, specified as a character vector.
SaveFigures
— Option to save MATLAB figures with test resultsfalse
(default) | true
Option to save MATLAB figures with test results, specified as
true
or false
. If you want to
include figures in results or reports, set this option to
true
.
Title
— Title of reportTitle of the report, specified as a character vector.
% Create the test file, test suite, and test case structure tf = sltest.testmanager.TestFile('API Test File'); ts = createTestSuite(tf,'API Test Suite'); tc = createTestCase(ts,'baseline','Baseline API Test Case'); % Get the test file options opt = getOptions(tf); % Set the title for the report, save figures, and include % 3 rows of plots per page. Columns per page default to 2. opt.Title = 'ABC Co. Test Results'; opt.SaveFigures = true; opt.IncludeSimulationSignalPlots = true; opt.NumPlotRowsPerPage = 3;