3.10.1 Overview of coverage information
Coverage information consists of indicators used to determine the coverage of tests of programs. The two types of coverage information indicators are the C0 information and the C1 information.
- Organization of this subsection
(1) C0 information and C1 information
The following explains the C0 and C1 information.
C0 (statement coverage information): Command coverage
This indicator determines the percentage of the commands in the tested job definition script that were executed. It is calculated as follows:
C0 = number of executed commands
total number of commands
100 (%)
C1 (branch coverage information): Branch coverage
This indicator determines the percentage of the branches in the tested job definition script that were executed. It is calculated as follows:
C1 = number of executed branches
total number of branches that could be executed
100 (%)
(2) Usage of coverage information
You can use the coverage information as reference data when you test your job definition scripts. You can also accumulate, display, and merge coverage information. For details about the coverage information that is acquired, see A. Coverage Information That Is Acquired.
The differences between Windows and UNIX in how coverage information is collected, displayed, and merged, are described in the following table.
Environment |
Collecting coverage information |
Displaying coverage information |
Merging coverage information |
---|---|---|---|
Windows development environment |
Use JP1/Advanced Shell Editor's debugging function to collect coverage information. The collected coverage information is accumulated in a coverage information file. Coverage information is not collected unless Accumulate coverage information is selected during execution environment setup. The coverage auto-acquisition functionality is not available. |
Either of the following methods can be used:
|
The adshcvmerg command# is used to merge coverage information. An editor cannot be used to merge coverage information. |
Windows execution environment |
When a job definition script is run, use the adshexec command with the coverage accumulation option (-t) specified to collect coverage information. The collected coverage information is accumulated in a coverage information file. The debugging function is not available. |
The adshcvshow command is used to display coverage information. |
The adshcvmerg command# is used to merge coverage information. |
UNIX execution environment |
Specify in the adshexec command one or both of the following options:
|
|
The adshcvmerg command# is used to merge coverage information. |
- Note
The following notes apply to sharing coverage information between different platforms:
- Do not transfer coverage information between different platforms.
- A coverage information file created in one OS cannot be processed with the commands of a different OS.
- #
You can use the adshcvmerg command to merge coverage information from two coverage information files at a time. To merge coverage information from three or more coverage information files, execute this command multiple times.