matlabtest.coverage.Justification - Justification for missing code coverage - MATLAB (original) (raw)
Main Content
Namespace: matlabtest.coverage
Justification for missing code coverage
Since R2024b
Description
A matlabtest.coverage.Justification
object represents the justification used to filter a block of MATLABĀ® source code that was not covered by tests. You cannot create objects of theJustification
class programmatically. The testing framework automatically creates a Justification
object and saves information about it to an XML file when you justify the missing coverage for a block of code in an interactive HTML code coverage report. For more information, see Justify Missing Coverage for MATLAB Source Code.
Properties
Path to the source file corresponding to the justification, returned as a string scalar.
Attributes:
GetAccess | public |
---|---|
SetAccess | immutable |
Name of the function in the source file that contains the filtered code block, returned as a string scalar. If the source file does not include functions, then the value is an empty string.
Attributes:
GetAccess | public |
---|---|
SetAccess | immutable |
Statement selected in the code coverage report to create the justification, returned as a string scalar. If you create the justification by selecting a function definition instead of a statement, then the value is an empty string.
Attributes:
GetAccess | public |
---|---|
SetAccess | immutable |
Justification reason, returned as a string scalar.
Attributes:
GetAccess | public |
---|---|
SetAccess | immutable |
Version History
Introduced in R2024b
When you justify the missing coverage for a code block, the testing framework saves information about the resulting Justification
object to an XML file. Previously, the framework saved justifications to MAT files. Compared with binary MAT files, XML files are better suited for source control workflows.