Main Content

sltest.testmanager.ParameterOverride class

Package: sltest.testmanager

Add or modify parameter override


Instances of sltest.testmanager.ParameterOverride are parameters overrides contained in a parameter set within a test case that can override model parameters.


obj = sltest.testmanager.ParameterSet.addParameterOverride creates a sltest.testmanager.ParameterOverride object for a parameter set object.


expand all

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

Value of the parameter override, specified as a scalar or vector value. If the value is a string, it is evaluated as a MATLAB® expression when the test executes.

Indicates if the parameter override is enabled, 0 if it is not enabled, or 1 if it is enabled.

Source of the parameter override, returned as a character vector. Two examples of sources are the base workspace and a Model reference. The parameter is read-only.

Workspace of the parameter to override, specified as a string or character vector.


removeRemove parameter override


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

% 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