Documentation

sltestiteration

Create test iteration

Syntax

iterObj = sltestiteration

Description

example

iterObj = sltestiteration returns a test iteration object, sltest.testmanager.TestIteration. You can use the function in the MATLAB® command window, or you can use it in the context of a scripted iteration under the Iterations section of a test case. For more information on creating test iterations, see Run Combinations of Tests Using Iterations.

Examples

collapse all

This example is a script that must be entered in the Scripted Iterations script text box under the Iterations section of a test case. Also, the system under test for this example is a model that contains Signal Builder groups.

%% Iterate Over All Signal Builder Groups
 
% Determine the number of possible iterations
numSteps = length(sltest_signalBuilderGroups);
 
% Create each iteration
for k = 1 : numSteps
    % Set up a new iteration object
    testItr = sltestiteration;
 
    % Set iteration settings
    setTestParam(testItr,'SignalBuilderGroup',sltest_signalBuilderGroups{k});
 
    % Add the iteration to run in this test case
    % You can pass in an optional iteration name
    addIteration(sltest_testCase,testItr);
end

Output Arguments

collapse all

Test iteration, returned as a sltest.testmanager.TestIteration object.

Introduced in R2016a

Was this topic helpful?