getComparisonResult
Class: sltest.testmanager.TestIterationResult
Package: sltest.testmanager
Get test data comparison result
Syntax
cr = getComparisonResult(tir)
Description
returns baseline or equivalence data comparison results cr
= getComparisonResult(tir
)cr
from the
sltest.testmanager.TestIterationResult
object
tir
.
Input Arguments
tir
— Test iteration result
sltest.testmanager.TestIterationResult object
Test iteration result to get baseline or equivalence data results from,
specified as an sltest.testmanager.TestIterationResult
object.
Output Arguments
cr
— Data comparison result
sltest.testmanager.TestIterationResult object | object
Result of the baseline or equivalence data comparison, specified as an
sltest.testmanager.ComparisonRunResult
object.
Examples
Get Comparison Results of a Baseline Test
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
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)