sltest.testmanager.Options Class
Namespace: sltest.testmanager
Return and specify test file options
Description
Get instances of sltest.testmanager.Options
to view test file
options, including report generation options. For test files, you can also set options.
View options using:
The sltest.testmanager.Options
class is a handle
class.
Creation
returns the test file options object associated with the test case, suite, or
file.obj
= getOptions(test
)
Input Arguments
test
— Test case, suite, or file
sltest.testmanager.TestCase
object
| sltest.testmanager.TestSuite
object
| sltest.testmanager.TestFile
object
Test case, suite, or file, specified as an sltest.testmanager.TestCase
, sltest.testmanager.TestSuite
, or sltest.testmanager.TestFile
object.
Properties
Author
— Report author
character vector
Author of the report, specified as a character vector.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
CloseFigures
— Option to close figures at end of test
true
(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.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
CustomReportClass
— Custom report generation class
character vector
Custom report generation class, specified as a character vector. For information, see Customize Test Results Reports.
CustomTemplateFile
— Path name of report generation custom template file
character vector
Path name of report generation custom template file, specified as a character vector. For information, see Customize Test Results Reports.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
GenerateReport
— Option to generate a report at end of test
false
(default) | true
Option to generate a report at the end of the test, specified as
true
or false
.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
IncludeComparisonSignalPlots
— Option to include simulation output and baseline plots in reports
true
(default) | false
Option to include simulation output and baseline plots in report,
specified as true
or false
.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
IncludeCoverageResult
— Option to include coverage results in reports
false
(default) | true
Option to include coverage results in reports, specified as
true
or false
.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
IncludeErrorMessage
— Option to include error and log messages in reports
true
(default) | false
Option to include error and log messages in reports, specified as
true
or false
.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
IncludeMATLABFigures
— Option to include figures generated from MATLAB® code in reports
false
(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.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
IncludeMLVersion
— Option to include MATLAB version in report
true
(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 reports
false
(default) | true
Option to include simulation metadata in reports, specified as
true
or false
.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
IncludeSimulationSignalPlots
— Option to include criteria and assessment plots in reports
false
(default) | true
Option to include criteria and assessment plots in reports, specified as
true
or false
.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
NumPlotRowsPerPage
— Number of rows of plots to include on report pages
2 (default)
Number 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
.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
NumPlotColumnsPerPage
— Number of columns of plots to include on report pages
1 (default)
Number 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
.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
IncludeTestRequirement
— Option to include test requirements in reports
true
(default) | false
Option to include test requirements in reports, specified as
true
or false
.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
IncludeTestResults
— Test results to include in the report
'failed'
(default) |'passed'
|
'all'
| enumerated
sltest.testmanager.TestResultsIncludedInReport
value
Test 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
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
ReportFormat
— Output format for report
'pdf'
(default) | 'zip'
|
'doc'
| enumerated
sltest.testmanager.ReportFileFormat
value
Output 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
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
ReportPath
— Path name of file to save report to
character vector
Path name of file to save report to, specified as a character vector.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
SaveFigures
— Option to save MATLAB figures with test results
false
(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
.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
Title
— Title of report
character vector
Title of the report, specified as a character vector.
Attributes:
SetAccess | public |
GetAccess | public |
Dependent | true |
NonCopyable | true |
Examples
Get and Set Test File Options
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;
Version History
Introduced in R2017a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)