Main Content

getComparisonSignalResults

Class: sltest.testmanager.ComparisonRunResult
Namespace: sltest.testmanager

Get test signal comparison result from comparison run result

Syntax

csr = getComparisonSignalResults(cr)

Description

csr = getComparisonSignalResults(cr) returns baseline or equivalence signal comparison results csr as a sltest.testmanager.ComparisonSignalResult object from the sltest.testmanager.ComparisonRunResult object cr.

To compare the test results of multiple models, you can compare the test results of each model to the same baseline data. You cannot compare more than two models in a single equivalence test case.

Input Arguments

expand all

Overall result of a baseline or equivalence data comparison, specified as a sltest.testmanager.ComparisonRunResult object. You get signal comparison results from the overall data comparison result.

Output Arguments

expand all

Result of the baseline or equivalence data comparison, specified as a sltest.testmanager.ComparisonSignalResult object.

Examples

expand all

This example shows how to programmatically get the comparison results of the second iteration of a baseline test case.

1. Get the path to the test file, then run the test file.

extf = 'sltestTestCaseRealTimeReuseExample.mldatx';
tf = sltest.testmanager.TestFile(extf);
ro = run(tf);

2. Get the test iteration results.

tfr = getTestFileResults(ro);
tsr = getTestSuiteResults(tfr);
tcr = getTestCaseResults(tsr);
tir = getIterationResults(tcr);

3. Get the comparison run result of iteration 2.

cr2 = getComparisonResult(tir(2))
cr2 = 

  ComparisonRunResult with properties:

    Outcome: Passed

4. Get the comparison signal result of the run result.

cr2sig = getComparisonSignalResults(cr2)
cr2sig = 

  1×2 ComparisonSignalResult array with properties:

    Outcome
    Baseline
    ComparedTo
    Difference

5. Clear the results and the Test Manager.

sltest.testmanager.clearResults;
sltest.testmanager.clear;
sltest.testmanager.close;

Version History

Introduced in R2017b