getIterationResults

Class: sltest.testmanager.TestCaseResult
Package: sltest.testmanager

Get iteration results

Syntax

iterArray = getIterationResults(result)

Description

iterArray = getIterationResults(result) returns the test iteration results that are children of the test case result.

Input Arguments

expand all

Test case results to get the iteration results from, specified as a sltest.testmanager.TestCaseResult object.

Output Arguments

expand all

Iteration result set, returned as an array of sltest.testmanager.TestIterationResult 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);

% Run test case that contains iterations
results = run(tc);

% Get iteration results
tcResults = getTestCaseResults(results);
iterResults = getIterationResults(tcResults);

Introduced in R2016a