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

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

example

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. Remove the default test suite.

tf = sltest.testmanager.TestFile("API Test File");
ts = createTestSuite(tf,"API TestSuite");
tc = createTestCase(ts,"equivalence","Equivalence Test Case");

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

Add a parameter override to Simulation 1 and 2

ps1 = addParameterSet(tc,Name="Parameter Set 1",SimulationIndex=1);
po1 = addParameterOverride(ps1,Rr=1.20);

ps2 = addParameterSet(tc,Name="Parameter Set 2",SimulationIndex=2);
po2 = addParameterOverride(ps2,Rr=1.24);

Capture the equivalence criteria.

eq = captureEquivalenceCriteria(tc);

Version History

Introduced in R2015b