matlab.unittest.plugins.codecoverage.CoverageReport class
Package: matlab.unittest.plugins.codecoverage
HTML format for code coverage report
Description
The matlab.unittest.plugins.codecoverage.CoverageReport
class provides
a way to generate code coverage reports in HTML format. To generate a code coverage
report in this format, create a CodeCoveragePlugin
instance using a
CoverageReport
object, and then add the plugin to the test
runner.
Creation
Description
reportFormat = matlab.unittest.plugins.codecoverage.CoverageReport
creates a CoverageReport
object that instructs
CodeCoveragePlugin
to generate a report in HTML format and
save it to a temporary folder. By default, the main file of the report is
index.html
.
reportFormat = matlab.unittest.plugins.codecoverage.CoverageReport(
specifies the name of the code coverage report folder.folderName
)
reportFormat = matlab.unittest.plugins.codecoverage.CoverageReport(___,"MainFile",
sets the fileName
)MainFile
property to the specified name. You can specify the
file name as the last argument in any of the previous syntaxes. For example,
reportFormat =
matlab.unittest.plugins.codecoverage.CoverageReport("MainFile","main.html")
returns a CoverageReport
object with its
MainFile
property set to
'main.html'
.