PureCoverage can record coverage data at the following levels of detail:
§ Line. PureCoverage records data about whether each individual source line in a functions) was executed by your tests. Data collected at this level can be displayed in the Annotated Source window.
§ Function. PureCoverage records data about whether each function was executed by your tests. Function level is as accurate as line level, but provides less detail.
§ Exclude. PureCoverage records no coverage data at all for excluded functions. This is the appropriate level for modules you cannot modify, such as system or third-party modules.
By default, PureCoverage monitors code at the line level for all modules for which debug line information is available. If no debug data is available for a module, PureCoverage excludes the module. By default, PureCoverage also excludes certain system modules.
You can change the default coverage level in the following ways:
§ By setting the coverage level for all modules to Function in the PowerCov tab in the settings dialog boxes. This setting applies to functions in all modules for which debug data is available. For more information, click
§ By setting an individual level for specific modules in the Module Coverage dialog box. For more information, click
§ By selecting specific modules for instrumentation in the Module Coverage [Selective] dialog box. If you use this approach, only the modules you select are instrumented. All others are excluded. Note that these settings apply only to runs of native-compiled (unmanaged) programs. For more information, click
§ By selecting specific classes for instrumentation in the Class Instrumentation. dialog box You can specify classes to included in instrumentation or excluded from instrumentation. For more information, click
Notes:
§ When you change coverage levels, you must rerun the program for the changes to take effect.
§ To collect coverage data at the line or function level, PureCoverage requires debug line information. If debug symbol data is not available for a function, PureCoverage labels the function UnnamedFunction@<offset>. PureCoverage can use symbol data from debug data associated with the module or, for native-compiled (unmanaged) programs, a .map file.
§ For native-compiled (unmanaged) programs, PureCoverage also requires relocation data to collect data at line or function level. If relocation data is not available for a module, PureCoverage excludes the module. PureCoverage identifies programs that do not have relocation data by adding (No Relocs) after the executable name in the Module Coverage dialog box.
§ If you're using IBM WebSphere Studio Workbench or Application Developer, debug data is made available by default. For the recommended settings, click
§ If you're using Visual Studio, you can build a release or debug version of a native-compiled program that contains relocation data by specifying the /fixed:no and /incremental:no linker options. For more information on the recommended settings for Visual Studio .NET, Visual Studio 2005 and Visual Studio 2008, click . For those for Visual Studio 6, click
.
§ Monitoring coverage at line level incurs a small amount of performance overhead during instrumentation and run-time.
§ Line level data collection is not available when you monitor Visual Basic p-code programs.
§ By default, PureCoverage excludes certain modules in the Windows directories. Some of these modules, known as system modules, are always excluded and you cannot change their coverage level. The coverage level for these modules appears as (System).
(C) Copyright IBM Corporation 1993, 2010.