deleteIterations

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

Delete test iterations that belong to test case

Syntax

deleteIterations(tc,iter)

Description

deleteIterations(tc,iter) deletes one or more test iterations from the test case.

Input Arguments

expand all

Test case that you want to delete the iteration from, specified as a sltest.testmanager.TestCase object.

Test iterations that you want to delete from the test case, specified as an array of sltest.testmanager.TestIteration objects.

Examples

expand all

% Create test file, test suite, and test case structure
tf = sltest.testmanager.TestFile('Iterations Test File');
ts = getTestSuites(tf);
tc = createTestCase(ts,'simulation','Simulation Iterations');

% Specify model as system under test
setProperty(tc,'Model','sldemo_autotrans');
 
% Set up table iteration
% Create iteration object
testItr1 = sltestiteration;
% Set iteration settings
setTestParam(testItr1,'SignalBuilderGroup','Passing Maneuver');
% Add the iteration to test case
addIteration(tc,testItr1);

% Set up another table iteration
% Create iteration object
testItr2 = sltestiteration;
% Set iteration settings
setTestParam(testItr2,'SignalBuilderGroup','Coasting');
% Add the iteration to test case
addIteration(tc,testItr2);

% Delete first iteration
deleteIterations(tc,testItr1);

Introduced in R2016a