Main Content

deleteIterations

Class: sltest.testmanager.TestCase
Namespace: 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

Load the model for this example.

load_system('sldemo_autotrans')

Create the 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 the model as the system under test.

setProperty(tc,'Model','sldemo_autotrans');

Set up a table iteration and create an iteration object. Then set the iteration settings and add the iteration to the test case.

testItr1 = sltestiteration;
setTestParam(testItr1,'SignalBuilderGroup','Passing Maneuver');
addIteration(tc,testItr1);

Set up another table iteration, iteration object, iteration settings, and add the iteration to the test case.

testItr2 = sltestiteration;
setTestParam(testItr2,'SignalBuilderGroup','Coasting');
addIteration(tc,testItr2);

Delete the first iteration.

deleteIterations(tc,testItr1);

Clear the Test Manager.

sltest.testmanager.clear
sltest.testmanager.clearResults
sltest.testmanager.close

Version History

Introduced in R2016a