主要内容

sltest.stmv2.results.TestCaseComparisonResult

R2026b

Test case comparison results (Tech Preview)

Since R2026b

    Description

    Note

    The redesigned Simulink® Test Manager is a tech preview in R2026b. The primary purpose of the tech preview is to provide early access to the most common testing workflows. For more information about supported workflows, see Overview of the Redesigned Simulink Test Manager (Tech Preview).

    To enable the feature, click the New Test Manager button in the existing Test Manager or use the sltest.stmv2.open function at the command line.

    sltest.stmv2.results.TestCaseComparisonResult objects represent a comparison between two test case runs in the redesigned Simulink Test Manager.

    Creation

    To create sltest.stmv2.results.TestCaseComparisonResult objects, run tests in the redesigned Simulink Test Manager UI, then use the sltest.stmv2.results.getAllResultSets function. Access sltest.stmv2.results.TestCaseComparisonResult objects, by using the TestCaseComparisonResults property of an sltest.stmv2.results.CUTResult object.

    Properties

    expand all

    This property is read-only.

    Result name, represented as a string scalar.

    Example: "myTestCase (RunSettings1 vs RunSettings2)"

    Data Types: string

    This property is read-only.

    Name of the test case, represented as a string scalar.

    Example: "myTestCase"

    Data Types: string

    This property is read-only.

    First run setting name, represented as a string scalar.

    Example: "RunSettings1"

    Data Types: string

    This property is read-only.

    Second run setting name, represented as a string scalar.

    Example: "RunSettings2"

    Data Types: string

    This property is read-only.

    Comparison name, represented as a string scalar.

    Example: "Comparison_1"

    Data Types: string

    This property is read-only.

    Sweep name, represented as a string scalar.

    Data Types: string

    This property is read-only.

    Test outcome, represented as one of these options:

    Result OutcomeDescription
    UNTESTEDNo test criteria return a pass or fail result.
    PASSAll test criteria pass.
    FAILOne or more test criteria fail.
    PARTIAL_PASSSome test criteria pass and the others are untested.
    INCOMPLETETest did not complete execution. For example, the test stopped early or has not run.
    ERRORThe test encountered an error during execution and did not complete.

    This property is read-only.

    Absolute tolerance, represented as a double.

    Data Types: double

    This property is read-only.

    Relative tolerance, represented as a double.

    Data Types: double

    This property is read-only.

    Time tolerance, represented as a double.

    Data Types: double

    This property is read-only.

    Simulation data used for comparison, represented as an array of Simulink.sdi.Run objects.

    This property is read-only.

    Execution log messages, represented as an sltest.stmv2.results.Log object array.

    This property is read-only.

    Sweep comparison results, represented as an array of sltest.stmv2.results.TestCaseComparisonResult objects.

    Review action, specified as an empty string scalar, "Reviewed", or "Unreviewed". To set the ReviewAction property, in the Test Results app, open the test case. In the summary section, set the value of the Review Action property.

    Example: "Reviewed"

    Data Types: string

    Review comment, specified as a string scalar.

    Example: "Results review complete."

    Data Types: string

    This property is read-only.

    Number of test case comparison results by outcome, represented as an sltest.stmv2.results.OutcomeCounts object.

    Object Functions

    getComparisonResultsTableCreate table from test case comparison result (Tech Preview)

    Examples

    collapse all

    Get the currently loaded result sets in the redesigned Simulink Test Manager.

    resultSets = sltest.stmv2.results.getAllResultSets;

    Get the first result set. Then, get the first test file result.

    rs = resultSets(1);
    tfr = rs.TestFileResults(1)

    From the test file result, get the CUT result. Then, get the test case comparison results.

    CUTr = tfr.CUTResults(1)
    tccr = CUTr.TestCaseComparisonResults(1)
    tccr = 
    
      TestCaseComparisonResult with properties:
    
                          Name: "myTestCase (RunSettings1 vs RunSettings2)"
                  TestCaseName: "myTestCase"
               RunSettingName1: "RunSettings1"
               RunSettingName2: "RunSettings2"
          ComparisonConfigName: "Comparison_1"
                     SweepName: ""
                       Outcome: PASS
                        AbsTol: 0
                        RelTol: 0
                       TimeTol: 0
                 ComparisonRun: []
                           Log: [1×1 sltest.stmv2.results.Log]
        SweepComparisonResults: [1×2 sltest.stmv2.results.TestCaseComparisonResult]
                  ReviewAction: ""
                 ReviewComment: ""
    

    Version History

    Introduced in R2026b