This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Class: sltest.testmanager.TestCase
Package: sltest.testmanager

Capture equivalence criteria and add to test case


eq = captureEquivalenceCriteria(tc,replaceAll)


eq = captureEquivalenceCriteria(tc,replaceAll) runs the System Under Test in Simulation 1 and captures an equivalence criteria set. The function returns an equivalence criteria object, sltest.testmanager.EquivalenceCriteria. This function can be used only if the test type is an equivalence test case.

Input Arguments

expand all

Test case to capture equivalence criteria in, specified as an sltest.testmanager.TestCase object.

Replace existing equivalence criteria if criteria already exists in the test case, specified as a Boolean. true replaces existing criteria, and false errors if criteria already exists in the test case.

Output Arguments

expand all

Equivalence criteria added to the test case, returned as an sltest.testmanager.EquivalenceCriteria object.


expand 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,'equivalence','Equivalence Test Case');

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

% Assign the system under test to the test case
% for Simulation 1 and Simulation 2

% Capture equivalence criteria
eq = captureEquivalenceCriteria(tc);

Introduced in R2015b