Code Coverage Tool Reference Manual

HP Code Coverage Tool Reference Manual for HP Integrity NonStop NS-Series Servers542684-004
4-1
4 Running the Application
Task Overview
In this step, you run the application with test data or a representative workload. A
program or DLL containing instrumented code generates a distinct raw data file each
time it completes execution. This raw data file is the record of what functions and basic
blocks were executed during the test run.
If an application is built by linking many source files and DLLs, the run generates one
raw data file that contains code coverage data from all instrumented components.
Prepare the Application for Testing
Preparing Test Cases
Select a set of test cases or a sample workload to use for your study.
Do not run your test in a production environment, because instrumented code runs
more slowly than uninstrumented code, and users could experience degradation in
throughput or response time.
Insulating the Application
The raw data file is placed in the default subvolume (or current working directory) when
the program or DLL is initiated. To keep the raw data files for different runs and
different applications separate:
Run each instrumented application in a different subvolume or working directory.
Archive raw data files that represent earlier versions of the source code. Remove
such files from the default subvolume or current working directory.
Use a different subvolume or working directory for different runs of the same
source code if you want to compare the code coverage provided by the various
Figure 4-1. Producing the Raw Data for Code Coverage Analysis
vst004.vsd
Test Cases
or
Sample Workload
Instrumented
Application
Raw Data Files
(ZZPFnnnn, .dyn)