IDz version 14.1.5 introduces a new way to export code coverage results in PDF format, removing the previous dependency on BIRT. We’ve designed the PDF layout to match the new web report UI to maintain consistency across code coverage reports on different platforms. For more information on the new web UI, see blog post here. We’ve added new features, while reworked some existing ones, and I’m excited to showcase some of those features in our new PDF exporter today.

We replaced the outgoing PDF exporter with the new exporter for several key reasons:

  • Increased formatting flexibility
  • Dynamic open source engine
  • Support of additional features
  • Active support via community
  • Portability

In this blog post I’ll go over the basics of our PDF report generation and some of the features of the new exporter.

Exporting Code Coverage Results to PDF

To export a code coverage PDF report, the Code Coverage Results view needs to be enabled. Alternatively, there is an option to export a web UI report to PDF. If there is at least one result in the view, right clicking on a result, then click on Export… to bring up the Coverage Result Export dialog window.

Select PDF in the Export Format drop down menu, enter a Destination Folder for the PDF (a default destination folder will be created in your home directory if none is entered), and a file name. If two results were selected in the Code Coverage Results view, there will be the option to export a comparison report. There is also an option to enter a string or regex filter to only show coverage information for source lines that matches the filter given.

To display the PDF report after it is generated, select Open PDF upon completion. Click Finish to start PDF export.

Additional export settings can be set by clicking Settings in the dialog. This displays the PDF Properties dialog window. You can find documentation for each of the options in the Documentation Center.

Once the report is generated, you can see that the PDF report layout has been revamped for clarity and ease of use. The Code structure is displayed in a tree format with indents to show child-parent relationships. Code coverage percentage for each item is also displayed in a new color format that clearly conveys coverage information at a glance.

Features of the new PDF Exporter

Several notable features of this PDF exporter that will be shipped in IDz v14.1.5:

  1. Reports can now be organized by file or module.
  2. If two or more results are selected, the results will be merged for PDF export.
  3. If exactly two results are selected, there will be an option to export to a comparision PDF report.
  4. We’ve added a new column to show the number of uncovered lines in each item, just to make it easier to pick out the important lines.
  5. PDF exporter will now support exporting Java Code Coverage in PDF report and Comparison PDF report formats.
  6. Reports will now feature a table of contents with hyperlinks to each respective component. In addition, if source is included in the export, all entries in the report will contain hyperlinks to their respective line of code. All pages will also have an interactive button to bring you to the top of the document.
  7. For simplicity, we’ve removed any files and modules with zero executable lines from the report. However, there’s still the option to include empty modules, in the case where no debug information was found.
  8. New, clearer icons to indicate coverage increase/decrease in comparison reports.
  9. In addition to the existing threshold filtering where the report will show results (and their parents) with coverage percentages that fall under the threshold, the exporter now also features filtering by a string, where the report will display results that contain the matching string or regular expression.

That sums up our brief intro to the PDF exporter, we hope you’ll enjoy the new Code Coverage PDF Exporter as much as we’ve enjoyed working on it. In a future blog entry we will show you how to generate PDF reports in Java code using the CCAPI.

Join The Discussion

Your email address will not be published. Required fields are marked *