Viewing previously saved code coverage reports

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:

  1. 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.
  2. Three files are needed to successfully import the code coverage report: *.clcoveragedata,*.componentMap, and *.metadata.
  3. Locate the files that contain your application name and the desired timestamp.
  4. Open the Project Explorer view in your workbench and create a new generic project:
    1. Right click in the Project Explorer view and select New > Project...
    2. In the dialog, select General > Project
    3. Click Next, give your project a name, and click Finish.
  5. Copy and paste the .clcoveragedata, .componentMap, and .metadata files into the new project.
    manual import
  6. 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

  1. Open a browser either within the Workbench or external to the Workbench.
  2. 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:
    manual import

Feedback