The first step in monitoring coverage is to collect the code-coverage data.
For Visual C++, instrument and run the program, either directly from Microsoft
Developer Studio using the Visual PureCoverage integration, or from Visual PureCoverage.
During instrumentation, Visual PureCoverage makes copies of the executable and its
associated modules. Visual PureCoverage also inserts additional code to detect which
functions and lines were executed in the program. Visual PureCoverage shows you its
progress as it instruments files.
For Visual Basic, run Visual Basic projects or p-code programs (Visual Basic 6.0
only), or Visual Basic native-code programs (Visual Basic 5.0 or later), either directly
from Microsoft Visual Basic using the Visual PureCoverage integration, or from Visual
PureCoverage. When you monitor projects or p-code programs, Visual PureCoverage puts the
Visual Basic for Applications (VBA) interpreter engine into a special mode that enables
Visual PureCoverage to monitor the engines operation and directly collect coverage
data as your code runs. For native-code programs, Visual PureCoverage instruments the
program and then collects code-coverage data. During instrumentation, Visual PureCoverage
makes copies of the executable and its associated object libraries. Visual PureCoverage
also inserts additional code to detect which procedures and lines were
executed in the program. Visual PureCoverage shows you its progress as it instruments
files.
For Java, run Java applets, class files, or code launched by container programs
from Visual PureCoverage (using the Run Program dialog) or from the command line. When you
monitor Java code, Visual PureCoverage puts the Microsoft virtual machine (VM) for Java
into a special mode that enables Visual PureCoverage to monitor the VMs operation
and directly collect code-coverage data as the applet, class file, or code runs.
When Visual PureCoverage starts monitoring, it displays the Run Summary window so you
can see both numerical and graphical information reflecting the progress of your testing,
and check other information about the run. As you exercise your code, Visual PureCoverage
records data about its code coverage. You can pause and resume data recording at any
time, enabling you to check specific portions of code. You can also take a snapshot of the
current data, enabling you to examine code coverage in stages.
When you exit the program, Visual PureCoverage displays the coverage data it collected.
Because there can be a lot of data, Visual PureCoverage automatically filters out
non-critical data from system libraries and other modules before it displays the
programs coverage details. As you analyze the coverage data, you can display more or
less data.
Tip: In addition to using Visual PureCoverage interactively, you can also
incorporate Visual PureCoverage into your test scripts for automated testing. For more
information, look up scripts in the Visual PureCoverage online Help
index.
More information? Look up developer studio, visual C++,
visual basic, java, run
summary, snapshots, and filters in the Visual
PureCoverage online Help index.