メインコンテンツ

slcoverage.stmv2.CoverageResult

R2026b

Coverage data for test 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.

An slcoverage.stmv2.CoverageResult object contains the coverage data for a single result in the test result hierarchy. Use the object properties and methods to inspect the enabled metrics, view and export coverage results, or retrieve cvdata objects.

Creation

You do not create an slcoverage.stmv2.CoverageResult object directly. Instead, obtain one by calling getCoverageResult on a result hierarchy object such as sltest.stmv2.results.ResultSet, sltest.stmv2.results.TestFileResult, sltest.stmv2.results.CUTResult, or sltest.stmv2.results.TestCaseResult.

Properties

expand all

This property is read-only.

Names of the coverage metrics, returned as a 1-by-N string array. The metrics appear in this order: "Execution", "Decision", "Condition", "MCDC", "LookupTable", "RelationalBoundary", "Saturation", "SLDVTest", "SLDVProof", "SLDVCondition", "SLDVAssumption", "Function", "FunctionCall".

If the test results contain no enabled coverage metrics, EnabledMetrics returns an empty string array.

Example: "Execution" "Decision" "Condition" "MCDC"

Data Types: string

This property is read-only.

Aggregated coverage totals across all rows, returned as a structure that contains one field for each enabled metric. Each field is a structure that contains these fields:

  • Satisfied — Number of satisfied coverage objectives

  • Unsatisfied — Number of unsatisfied coverage objectives

  • Justified — Number of justified coverage objectives

  • Total — Total number of coverage objectives

Each field that displays coverage counts returns the data as a 32-bit unsigned integer. The structure only contains fields for enabled metrics. If no metrics are enabled, the Summary structure is empty.

Data Types: struct

Object Functions

tableCreate table of coverage results from redesigned Test Manager coverage results (Tech Preview)
cvdataExtract coverage results generated using the redesigned Test Manager as a cvdata object (Tech Preview)

Examples

collapse all

Get the most recent result set and retrieve its coverage result.

rs = sltest.stmv2.results.getAllResultSets;
cr = rs.getCoverageResult;

View the enabled metrics and the decision coverage summary.

cr.EnabledMetrics
cr.Summary.Decision

Version History

Introduced in R2026b