主要内容

getTestCaseResultsTable

R2026b

Create table from test case 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.

tcrTable = getTestCaseResultsTable(tcr) creates a table from the specified test case results in the redesigned Simulink Test Manager.

example

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 results.

CUTr = tfr.CUTResults(1)
tcr = CUTr.TestCaseResults(1);

Convert the first result set into a table.

tars = getTestCaseResultsTable(tcr(1))
ans =

  1×8 table

                Name                TestFileName                CUTName                    RunSettingName        SweepName    Outcome    ReviewAction    ReviewComment
    ____________________________    ____________    _______________________________    ______________________    _________    _______    ____________    _____________

    "Hydraulic system 1 failure"     "TestFile"     "aircraftElevatorFaultAnalyzer"    "[DefaultRunSettings]"       ""        "PASS"          ""              ""      

Input Arguments

collapse all

Test case result from the redesigned Simulink Test Manager, specified as a TestCaseResult object. Each column heading in the table matches the associated field in the TestCaseResult object, and each column entry is a string scalar.

Output Arguments

collapse all

Test case result table, returned as a table.

Version History

Introduced in R2026b