Main Content

getParameterOverrides

Class: sltest.testmanager.ParameterSet
Package: sltest.testmanager

Get parameter overrides

Syntax

ovrs = getParameterOverrides(ps)

Description

ovrs = getParameterOverrides(ps) gets the parameter overrides in a parameter set and returns them as an array of parameter override objects, sltest.testmanager.ParameterOverride.

Input Arguments

expand all

Parameter set that you want to get the override from, specified as a sltest.testmanager.ParameterSet object.

Output Arguments

expand all

Parameter overrides that are in the parameter set object, returned as an array of sltest.testmanager.ParameterOverride objects.

Examples

expand all

% Open the model for this example
openExample('sldemo_absbrake');

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

% Remove the default test suite
tsDel = getTestSuiteByName(tf,'New Test Suite 1');
remove(tsDel);

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

% Capture the baseline criteria
baseline = captureBaselineCriteria(tc,'baseline_API.mat',true);

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

% Check that the parameter override is applied
ovr = getParameterOverrides(ps);
Introduced in R2015b