Main Content


Class: sltest.testmanager.TestCaseResult
Namespace: sltest.testmanager

Get test case signal comparison results


run = getComparisonRun(result)


run = getComparisonRun(result) gets the test case comparison results that belong to the test case results object. The results are output to a Simulink.sdi.Run object, which contains signal data for each comparison, tolerance, and difference result.

Input Arguments

expand all

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

Output Arguments

expand all

Test case comparison signal results, returned as a Simulink.sdi.Run object.


expand all

% Open the model for this example

% 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');

% Assign the system under test to the test case

% Capture the baseline criteria and record baseline
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
compOut = getComparisonRun(tcr);

Version History

Introduced in R2015a