Main Content

matlabtest.coverage.Justification Class

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 the Justification class programmatically. The testing framework automatically creates a Justification object and saves it to a MAT 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

expand all

Absolute 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 any 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