To collect coverage data:
Compile
and link your application under PureCoverage to instrument
the program with coverage monitoring instructions:
%
purecov cc -g <myprog>.o
or, if you compile and link at the same time:
%
purecov cc -g <myprog>.c
The -g
option supplies debug data that makes it possible for PureCoverage to
collect coverage data at the line level;
without it, PureCoverage can collect data only at the function level.
Run
the application to collect coverage data.
%
a.out
The application displays its normal output on the console, just as
if it were not instrumented. In addition, PureCoverage displays its start-up
banner and recording message. For an example, click
As you exercise the program, PureCoverage records data about function
and line usage. When you exit the program, PureCoverage saves the coverage
data in a PureCoverage data file (.pcv).
The next step in using PureCoverage is to view the coverage
data.
What else can you do?
Collect coverage data for Java applications running on a Solaris SPARC 32-bit Java virtual machine (JVM); for information, click
Collect coverage data for viewing on a Windows system.
Exclude files from coverage monitoring.
Fine-tune data collection with PureCoverage API functions.
Redirect all PureCoverage run-time messages to a file using the -log-file option.
Use PureCoverage in automated testing.