generateHTMLReport
Class: matlab.coverage.Result
Namespace: matlab.coverage
Syntax
Description
generateHTMLReport(
generates an
interactive code coverage report in HTML format from the coverage results and saves it to
a temporary folder. By default, the method names the main file of the report
results
)index.html
.
An interactive code coverage report lets you customize the displayed information by selecting options in the report. For example, you can choose from the list of included coverage metrics, or control the highlighting for covered or missed executables.
generateHTMLReport(
saves the report to the specified folder.results
,folderName
)
generateHTMLReport(___,
specifies options using one or more name-value arguments in addition to any of the input
argument combinations in previous syntaxes. For example,
Name=Value
)generateHTMLReport(results,MainFile="main.html")
generates a code
coverage report whose main file is main.html
.
filePath = generateHTMLReport(___)
returns the
absolute path to the main HTML file. Unlike the previous syntaxes, this syntax does not
automatically open the generated report.
Input Arguments
Examples
Tips
To generate an interactive HTML code coverage report without explicitly collecting the coverage results, create a
CodeCoveragePlugin
instance using aCoverageReport
object, and then add the plugin to the test runner.