主要内容

cvdata

R2026b

Extract coverage results generated using the redesigned Test Manager as a cvdata object (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.

covData = cvdata(covResult) returns the coverage data in covResult as a cvdata object. Use the returned cvdata objects with coverage functions such as cvhtml (Simulink Coverage).

Examples

collapse all

Get the coverage results from the test case results.

resultSet = sltest.stmv2.results.getAllResultSets();
testCaseResult = resultSet(end).TestFileResults(1).CUTResults(1).TestCaseResults(1);
coverageResult = testCaseResult.getCoverageResult();

Extract the coverage data and generate an HTML report.

covData = coverageResult.cvdata();
cvhtml("report.html",covData);

Input Arguments

collapse all

Coverage results, specified as an slcoverage.stmv2.CoverageResult object.

Output Arguments

collapse all

Coverage data, returned as a cvdata (Simulink Coverage) object.

Version History

Introduced in R2026b

See Also

| | (Simulink Coverage)