sltest.testmanager.Options class

Package: sltest.testmanager
Superclasses:

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 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 Results Reports.

Path name of report generation custom template file, specified as a character vector. For information, see Customize Test Results 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.

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.

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.

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. If you want to include figures in results or reports, set this option to true.

Title of the report, specified as a character vector.

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;
Introduced in R2017a