Main Content

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.

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

obj = getOptions(test) returns the test file options object associated with the test case, suite, or file.

Input Arguments

expand all

Test case, suite, or file, specified as an sltest.testmanager.TestCase, sltest.testmanager.TestSuite, or sltest.testmanager.TestFile object.

Properties

expand all

Author of the report, specified as a character vector.

Attributes:

SetAccess
public
GetAccess
public
Dependent
true
NonCopyable
true

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

Custom report generation class, specified as a character vector. For information, see Customize Test Results Reports.

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

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

Option to include simulation output and baseline plots in report, specified as true or false.

Attributes:

SetAccess
public
GetAccess
public
Dependent
true
NonCopyable
true

Option to include coverage results in reports, specified as true or false.

Attributes:

SetAccess
public
GetAccess
public
Dependent
true
NonCopyable
true

Option to include error and log messages in reports, specified as true or false.

Attributes:

SetAccess
public
GetAccess
public
Dependent
true
NonCopyable
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

Option to include the MATLAB version you are running in the report, specified as true or false.

Option to include simulation metadata in reports, specified as true or false.

Attributes:

SetAccess
public
GetAccess
public
Dependent
true
NonCopyable
true

Option to include criteria and assessment plots in reports, specified as true or false.

Attributes:

SetAccess
public
GetAccess
public
Dependent
true
NonCopyable
true

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

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

Option to include test requirements in reports, specified as true or false.

Attributes:

SetAccess
public
GetAccess
public
Dependent
true
NonCopyable
true

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

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

Path name of file to save report to, specified as a character vector.

Attributes:

SetAccess
public
GetAccess
public
Dependent
true
NonCopyable
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 of the report, specified as a character vector.

Attributes:

SetAccess
public
GetAccess
public
Dependent
true
NonCopyable
true

Examples

collapse all

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