Main Content

sltest.testmanager.ParameterSet class

Package: sltest.testmanager
Superclasses:

Add or modify parameter set

Description

Instances of sltest.testmanager.ParameterSet are sets of parameters in a test case that can override model parameters.

Construction

obj = sltest.testmanager.TestCase.addParameterSet creates a sltest.testmanager.ParameterSet object for a test case object.

Properties

expand all

Name of the parameter set, specified as a character vector.

File path of the parameter set if parameters were added from a file, returned as a character vector.

Indicates whether to use the overrides in the parameter set during test execution. If Active is 0, the overrides are not used. If Active is 1, the overrides are used.

Methods

addParameterOverrideAdd parameter override to parameter set
export Export parameter set to Excel spreadsheet
getParameterOverridesGet parameter overrides
removeRemove parameter set

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');

% Assign the system under test to the test case
setProperty(tc,'Model','sldemo_absbrake');

% Test a new model parameter by overriding it in the test case
% parameter set
ps = addParameterSet(tc,'Name','API Parameter Set');
po = addParameterOverride(ps,'m',55);
Introduced in R2015b