You can specify code coverage acceptance levels for one
or more of the following elements: program, module,
source file, and proceduremodule, compilation
unit, source file, and program flow. All criteria must be met
in order for the program to be flagged as passing the code coverage
requirements.
About this task
When you set code coverage levels, the level that you
enter is the minimal acceptable percentage of code coverage. You can
set acceptable code coverage levels for one or more of the following
elements:
- Program
- Module
- Source file
- Procedure
- Module
- Compilation unit
- Source file
- Program flow
By default, a code coverage result uses a module threshold of
80% as its only acceptance criterion.
Note: Changing the threshold
criteria for your code coverage results, results in the status column
in the Code Coverage Results view being updated.
Procedure
To customize the code coverage acceptance levels or thresholds: - Select .
- Select .
- Specify the minimum acceptable percentage of code coverage
for one or more of the following elements:
- Program: the percentage of lines that must
be covered in a program in order to meet the acceptance criteria.
- Module: the percentage of lines that must
be covered in the module in order to meet the acceptance criteria.
- Source file: the percentage of lines that
must be covered in the source file in order to meet the acceptance
criteria.
- Procedure: the percentage of lines that
must be covered in a procedure in order to meet the acceptance criteria.
- Module: the percentage of lines that must
be covered in the module in order to meet the acceptance criteria.
- Compilation unit: the percentage of lines
that must be covered in the compilation unit in order to meet the
acceptance criteria.
- Source file: the percentage of lines that
must be covered in the source file in order to meet the acceptance
criteria.
- Program flow: the percentage of lines that
must be covered in the program flow in order to meet the acceptance
criteria.
Use the check boxes, to select the desired elements. Enter the
minimum acceptable code coverage percentages in the associated box
for each element selected.
- Click the OK button.
- To restore the default acceptance criteria for a code
coverage result, open the code coverage preferences page and click Restore
Defaults . The module threshold level will be reset to
80% and all other threshold levels will be deselected.
Note that all criteria must be met in order for the program
to be flagged as passing the code coverage requirements. An icon will
appear in the Compiled Code Coverage Results view indicating
whether the acceptance criteria passed or failed. Additionally, each
failed element is decorated in the report view with a red "x" overlay.
For example, in the following report, the selected item is marked
with a red "x" because it did not meet the threshold requirement.