getOutputRuns

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

Get test case simulation output results

Syntax

runArray = getOutputRuns(result)

Description

runArray = getOutputRuns(result) gets the test case simulation output results that are direct children of the test case results object.

Input Arguments

expand all

Test case results to get simulation output results from, specified as a sltest.testmanager.TestCaseResult object.

Output Arguments

expand all

Test case simulation output results, returned as a Simulink.sdi.Run object array.

Examples

expand all

% Create the test file, test suite, and test case structure
tf = sltest.testmanager.TestFile('API Test File');
ts = createTestSuite(tf,'API Test Suite');
tc = createTestCase(ts,'baseline','Baseline API Test Case');

% Remove the default test suite
tsDel = getTestSuiteByName(tf,'New Test Suite 1');
remove(tsDel);

% Assign the system under test to the test case
setProperty(tc,'Model','sldemo_absbrake');

% Capture the baseline criteria
baseline = captureBaselineCriteria(tc,'baseline_API.mat',true);

% Test a new model parameter by overriding it in the test case
% parameter set
ps = addParameterSet(tc,'Name','API Parameter Set');
po = addParameterOverride(ps,'m',55);

% Set the baseline criteria tolerance for one signal
sc = getSignalCriteria(baseline);
sc(1).AbsTol = 9;

% Run the test case and return an object with results data
resultsObj = run(tc);

% Get test case result
tcr = getTestCaseResults(resultsObj);

% Get the baseline run dataset
runArray = getOutputRuns(tcr);

Introduced in R2015a