Documentation

sltest.testmanager.Options class

Package: sltest.testmanager
Superclasses:

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 these options. View options using:

Construction

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.

Option to close figures at the end of the test, specified as true to close the figures and false to leave them open.

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

Path name of report generation custom template file, specified as a character vector. For information, see Customize Test Reports.

Option to generate a report at the end of the test, specified as true or false.

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

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

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

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.

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.

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

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

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

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

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

Option to save MATLAB figures with test results, specified as true or false. Set this option to 'true' if you want to include figures in results or reports.

Title of the report, specified as a character vector.

Examples

expand 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 and save figures
opt.Title = 'ABC Co. Test Results';
opt.SaveFigures = true;

Introduced in R2017a

Was this topic helpful?