Main Content

Filter Code Coverage Outcomes

When you analyze coverage for code, you can filter outcomes that are not applicable to the current testing. For information about how to create filter rules, see Create, Edit, and View Coverage Filter Rules. Simulink® Coverage™ supports filtering these types of code coverage:

Coverage Type

Justification Rule Supported

Exclusion Rule Supported

Decision outcome

Yes

No

Condition outcome

Yes

No

MCDC outcome

Yes

No

Relational boundary outcome

Yes

No

Statement

No

Only when you exclude the file or function that contains the statement.

File

Yes

Yes

Function

Yes

Yes

Decision expression

Yes

Yes

Condition expression

Yes

Yes

When you create and apply an exclusion filter rule, the coverage report includes a Model Objects Excluded from Coverage Analysis section that contains a list of the exclusions. When you create and apply a justification filter rule, the coverage report displays the justified coverage outcomes in the Details by Model Object section, where the coverage analysis tables display the justified outcomes in light blue. For more information, see Use Justification Rules to Filter Code Coverage Outcomes.

Note

If you apply exclusion filter rules to all the code constructs that can receive coverage, the Code and Objects Filtered from Coverage Analysis sections do not appear. The coverage summary report instead displays There is no coverage information to report.

Related Topics