Setting the code coverage thresholds
You can set code coverage thresholds to decide whether a result is passed, warning, or failed.
About this task
In the Code Coverage Results view, you can check the status of a result.
- If the coverage percentage is smaller than the failure threshold, the Failed icon () is displayed in the Status column.
- If the coverage percentage level is smaller than the warning threshold, but greater than or equal to the failure threshold, the Warning icon () is displayed in the Status column.
- If the coverage percentage is greater than or equal to the warning threshold, the Passed icon () is displayed.
By default, a code coverage result uses a failure threshold of 80% and a warning threshold of 90%. You can specify different values on the File Analysis Defaults preference page.
Procedure
To specify the thresholds, complete the following steps:
Results
The newly-specified values are applied in the Code Coverage Results view and web-based reports.
When you export results in PDF format, you can set a specific code coverage acceptance level in the PDF Properties window.