Note: This facility is supported in native COBOL only.
- Create a test coverage configuration file.
- Set the TESTCOVER environment variable.
The value of the variable should be the path of the test coverage configuration file.
- Build your application with the TESTCOVER compiler directive set.
- Run your application.
Depending on how you set the options in your configuration file, one or more results (.tcz) files are created.
- If you want test coverage to report on tagged lines, create a tag file.
- Use
cobtcreport to produce reports from the results files. If you want to include information on tags, set the
taglines option.
Note: If test coverage statistics are no longer required for a program, you are advised to recompile it with NOTESTCOVER to ensure
that you do not suffer any performance overheads (by collected coverage statistics) when the program is run in the future.