Main Content

Collect Decision, Condition, and MC/DC Coverage for MATLAB Code

Collect decision coverage, condition coverage, and modified condition/decision coverage (MC/DC) for MATLAB® code

Collect information about decision coverage, condition coverage, and modified condition/decision coverage (MC/DC) for your source code when you run tests with MATLAB Test™. View coverage results in reports or at the command line, and use justifications to filter blocks of code not covered by the tests.

For an example of basic code coverage analysis using the MATLAB unit testing framework, see Collect Statement and Function Coverage Metrics for MATLAB Source Code.

Classes

matlabtest.coverage.JustificationJustification for missing code coverage (Since R2024b)
matlabtest.plugins.codecoverage.StandaloneReportFormat for standalone code coverage report (Since R2024a)
matlabtest.coder.plugins.GeneratedCodeCoveragePluginPlugin for code coverage information for generated C/C++ code equivalence tests (Since R2023a)

Functions

applyFilterApply filters to coverage results (Since R2024b)
resetFilterRemove filters from coverage results (Since R2024b)
generateStandaloneReportGenerate standalone report from coverage results (Since R2024a)

Topics

Collect Coverage for MATLAB Code

Collect Coverage for Generated Code