You can view previously saved code coverage reports. This
is useful if the desired code coverage report cannot be generated
from the Compiled Code Coverage Launch History view anymore.
Previously saved Workbench reports can be viewed within the workbench;
previously saved HTML reports can be viewed either within the workbench
or in an external browser.
Viewing previously saved Workbench reports
Procedure
Click File > Open
File... and open the *.analysis file
that was saved.
If the report was not saved, an import
may still be possible:
Navigate to %workspace%\.metadata\.plugins\com.ibm.debug.pdt.codecoverage.core in
your filesystem, where %workspace% is the workspace
where the code coverage report was generated.
Three files are needed to successfully import the code
coverage report: *.clcoveragedata,*.componentMap, and *.metadata.
Locate the files that contain your application name
and the desired timestamp.
Open the Project Explorer view in your workbench
and create a new generic project:
Right click in the Project Explorer view and select New > Project...
In the dialog, select General > Project
Click Next, give your project a name, and click Finish.
Copy and paste the .clcoveragedata, .componentMap, and .metadata files
into the new project.
Right click the *.clcoveragedata file and select Compiled Code Coverage > Import. A new launch is created in the Compiled Code Coverage
Launch History view and a Workbench report is opened automatically.
You can work with an imported launch in the same way that you work
with a launch created by a run.
Viewing previously saved HTML reports
About this task
When you save an HTML code coverage report to your file
system, a number of files are generated and stored in the directory
specified. To view, the saved report:
Procedure
Open a browser either within the Workbench or external
to the Workbench.
Specify the directory location in the URL field followed
by index.html. For example, to view the HTML code coverage
report stored in C:\export2 enter C:\export2\index.html: