Main Content


Create test iteration



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 Test Iterations.


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 Editor scenarios.

% Determine the number of possible iterations
numSteps = length(sltest_signalEditorScenarios);
% Create each iteration
for k = 1 : numSteps
    % Set up a new iteration object
    testItr = sltestiteration;
    % Set iteration settings
    % Add the iteration to run in this test case
    % You can pass in an optional iteration name

Output Arguments

collapse all

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

Introduced in R2016a