Main Content

sltest.testmanager.EquivalenceCriteria Class

Namespace: sltest.testmanager

Add or modify equivalence criteria

Description

Instances of sltest.testmanager.EquivalenceCriteria is a set of signals in a test case that determines the pass-fail criteria in an equivalence test case.

The sltest.testmanager.EquivalenceCriteria class is a handle class.

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

Description

example

obj = sltest.testmanager.TestCase.captureEquivalenceCriteria creates a sltest.testmanager.EquivalenceCriteria object for a test case object.

Properties

expand all

Indicates if the equivalence criteria is enabled, 0 if it is not enabled, and 1 if it is enabled.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: logical

Methods

expand all

Examples

collapse 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,'equivalence','Equivalence 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
% for Simulation 1 and Simulation 2
setProperty(tc,'Model','sldemo_absbrake','SimulationIndex',1);
setProperty(tc,'Model','sldemo_absbrake','SimulationIndex',2);

% Capture equivalence criteria
eq = captureEquivalenceCriteria(tc);

Version History

Introduced in R2015b