Note: This facility is supported in native COBOL only.
You can use the IDE preferences to configure whether the IDE produces code coverage reports in HTML format in addition to
the code coverage statistics shown in the Code Coverage view. The preferences you specify apply to all projects that you execute
with code coverage.
To specify your preferences for what the HTML code coverage report files should include
:
- In the IDE, click
Window > Preferences > Micro Focus > COBOL > Code Coverage.
You can specify the following preferences:
- Generate reports upon run completion
- Check this for the IDE to automatically show the code coverage report at the end of executing your application with code coverage
enabled. If this is not checked, you can locate the file manually in a subfolder of your project which is defined as the
Results directory specified on the
Dynamic Analysis tab of the launch configuration in which you executed the application.
- Always use the default report generation options
- Check this if you want to always use the report generation options specified in these IDE preferences. If this is not enabled,
you are prompted to specify code coverage report generation options every time you execute an application that has code coverage
enabled.
You can choose any of the following report generation options:
- Produce a single HTML file, instead of one per program
- Check this for code coverage to produce a single reports file, instead of individual ones on a per program basis.
- Display the basic block number of each statement in the rightmost column
- Check this for the report to display the basic block number of each statement in the rightmost column. Blocks can be thought
of as a number of contiguous statements with no jumps. They are executed consecutively. Lines within a block will have the
same basic block number. There is a limit of 65535 basic blocks per program.
- Display a summary of called subroutines
- Check this to include a summary of about CALLed subroutines in the report. Called subprograms are listed alphabetically. The
CALL overhead in COBOL can be considerable, and this lets users identify the most commonly called routines.
- Display the total execution count for each data item in the program
- Check this for the report to include the total execution count for each data item in the program. ie. it totals the execution
counts for all statements in which a data item is referenced. This report also identifies misaligned 2-, 3- or 4-byte items.
- Display a summary of COBOL verbs used
- Check this to include a summary of the COBOL verbs used in the report. Verbs are listed in descending order of execution.
The columns used are:
- occurs - which shows the number of occurrences of that verb in a program
- coverage - which shows the number of this type of statement that were covered, and what percentage of these verbs it represents
- executed - which is the total of all the execution counts for this type of statement, and the percentage of the program's
total execution count this represents
- Include only lines containing specific text in column 1-6:
- Specify the tags in your source code for which you want the report to generate specific information. You can use a space as
a separator.