To collect coverage data for a component, such as an ActiveX control, you can use selective instrumentation to instrument and collect coverage data only for the component.
For example, to monitor a Visual C++ ActiveX control run in Microsoft Internet Explorer 4.0 or later:
1. In the Run Program dialog box, select Internet Explorer (usually located in C:\Program Files\Plus!\Microsoft Internet\Iexplore.exe or C:\Program Files\Internet Explorer\Iexplore.exe) and then click Settings.
2. Select Selected Modules and click Configure... to select the component and specify settings. For more information about using selective instrumentation, click .
3. Click Run to run Internet Explorer. When Internet Explorer loads the control, PureCoverage instruments the control and collects coverage data for it while it runs.
You can also use inclusive instrumentation to 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.
For example, to monitor a Visual C++ ActiveX control run in Microsoft Internet Explorer 4.0:
1. In the Run Program dialog box, select Internet Explorer (usually located in C:\Program Files\Plus!\Microsoft Internet\Iexplore.exe or C:\Program Files\Internet Explorer\Iexplore.exe) and then click Settings.
2. Ensure that Line or Function is selected as the default coverage level. In the PowerCov tab, click Configure... to select Exclude as the coverage level for lexplore.exe.
3. Instrument and run Internet Explorer. When Internet Explorer loads the control, PureCoverage instruments the control and collects coverage data for it. To isolate the coverage data for the control, use the Run Control toolbar to start and stop recording and clear data.
Notes:
§ When you selectively instrument a component in the transient state, PureCoverage collects coverage data the first time you load and execute the component. If your program unloads the component and then reloads it during the same program run, data is not collected for the subsequent execution. To collect data for a component each time you reload it during a program run, instrument the component in the permanent state.
§ To use inclusive instrumentation to monitor Visual C++ controls launched from Internet Explorer with the Active Desktop installed, you must pass the -new argument to Internet Explorer. For example, to monitor a control from the command line, type coverage <path to IE>\iexplore.exe -new. The -new argument causes a new Iexplore.exe process to be instrumented before monitoring your control. Without this argument, the control is run by the current desktop explorer and no coverage data is collected. To check whether the Active Desktop is installed, right-click your desktop and select Properties from the shortcut menu. If the Active Desktop component is installed, the Properties dialog box has a Web tab.
(C) Copyright IBM Corporation 1993, 2010.