主要内容

getCoverageResultsTable

R2026b

Create table of coverage 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.

Use the getCoverageResultsTable function to extract coverage data from a test result object, such as sltest.stmv2.results.TestFileResult or sltest.stmv2.results.TestCaseResult. The getCoverageResultsTable function is the same as using the table function on the coverage result object created by the getCoverageResult function.

covTable = getCoverageResultsTable(obj) generates a table from the coverage results in the test results, obj. If obj does not contain coverage data, this function returns an empty table with the columns AnalyzedModel and Checksum.

Examples

collapse all

Get the most recent test result set and display its coverage results in a table.

rs = sltest.stmv2.results.getAllResultSets();
t = rs(end).getCoverageResultsTable();
disp(t)

Input Arguments

collapse all

Test results, specified as one of these objects:

  • sltest.stmv2.results.ResultSet

  • sltest.stmv2.results.TestFileResult

  • sltest.stmv2.results.CUTResult

  • sltest.stmv2.results.TestCaseResult

Output Arguments

collapse all

Coverage results, returned as a table. The table contains one row for each analyzed model. The table contains the columns AnalyzedModel and Checksum, and additional columns for each enabled metric such as Metric_Unsatisfied, Metric_Justified, or Metric_Total.

If no coverage data is present, this function returns an empty table with the columns AnalyzedModel and Checksum.

Alternative Functionality

Functions

getCoverageResultsTable creates the same results as using the table function on the object created by the getCoverageResult function.

Version History

Introduced in R2026b