sltest.plugins.coverage.ModelCoverageReport Class
Namespace: sltest.plugins.coverage
Superclasses: matlab.mixin.Heterogeneous
Specify model coverage report details for tests run with MATLAB Unit Test
Description
Use the sltest.plugins.coverage.ModelCoverageReport
class to specify the
coverage report details and the file name and location for tests run with the MATLAB® Unit Test framework. If you have a license for Parallel Computing Toolbox™, you can use the ModelCoverageReport
with parallel test
execution.
The sltest.plugins.coverage.ModelCoverageReport
class is a handle
class.
Creation
creates a model coverage report after the test runs. The report uses a default name and is
saved in the current working folder.mcr
= sltest.plugins.coverage.ModelCoverageReport
uses a default name and saves the report in the folder specified by the
mcr
= sltest.plugins.coverage.ModelCoverageReport(path
)path
.
uses the specified report name with the model name appended to it, and saves the report in the
current working folder. For example, for an HTML report, if you specify the report name as
mcr
= sltest.plugins.coverage.ModelCoverageReport('ReportName'
,name
)MyReport
and the model being tested is myModel
, the
report name is MyReport_mymodel.html
.
uses the specified report name and saves the report in the folder specified by the
mcr
= sltest.plugins.coverage.ModelCoverageReport(path
,'ReportName'
,name
)path
.
You can also import the plugin, then use the class name to create the object:
import sltest.plugins.coverage.ModelCoverageReport
mcr = ModelCoverageReport(path)
Use ModelCoveragePlugin
to specify report properties before you run the test:
Create a
ModelCoverageReport
.Create a
ModelCoveragePlugin
, and specify theModelCoverageReport
by using theProducing
property.Add the
ModelCoveragePlugin
to theTestRunner
.Run the test.