Tips for Collecting Coverage Data

Related Topics

 

§          You can drag and drop executable files onto the PureCoverage user interface to start collecting coverage data.

§          PureCoverage can monitor code at the following levels:

This level

Returns

Line

Data about the execution of each individual source line in a module.

Function

Data about the execution of functions in a module.

Exclude

No data for a module.

System

No data. PureCoverage assigns this level to system modules.

To improve the performance of native-compiled programs under PureCoverage, choose appropriate coverage levels for each module. Don't collect more data than you need.

§          Instrument only one or two classes or modules by using selective instrumentation.

§          To save time when you run a native-compiled program, pre-instrument libraries that are loaded by LoadLibrary as your program executes. Drag and drop a library file (.dll) onto the PureCoverage user interface.

§          As your program runs under PureCoverage, click images\pauseic.gif to pause data collection until your program begins to execute a routine you want to monitor, then click images\pauseic.gif again to resume data collection.

§          Click images\snapic.gif to take snapshots of coverage status at specific points in the program's execution. After your program exits, click images\diffic.gif to create a set of data consisting only of the data collected between two snapshots.

§          You can run an instrumented Visual C++ program as a system service.

§          You can collect coverage data for an instrumented native-compiled program by running it directly, outside of PureCoverage. The PureCoverage product and cache directories must appear in your PATH environment variable.

§          To collect coverage data for a component such as an ActiveX control, you can use selective instrumentation to instrument only the component, or you can instrument and run the container program that loads the component. When the container program loads the component, PureCoverage instruments the component and collects coverage data.

§    If a non-critical module prevents PureCoverage from monitoring your program, try monitoring the program again specifying the /CoverageExcludeMust option at the command line or in Additional options in the Settings for <exename> dialog box to exclude the module from coverage.

(C) Copyright IBM Corporation 1993, 2010.