JGenHtml - Code Coverage Report


Viewing the report

JGenHtml produces two versions of the same report:

  1. XML + XSLT
  2. HTML

Why are there two versions and when to use which?

Ideally there would be only one version, the XML + XSLT version. The main advantages of this format over HTML are:

The problem with client side XSLT is that support for it on the "file:" protocol is problematic in many browsers.

You can use either version anywhere, but the HTML version would be best on the "file:" protocol while the XML version would be best over http.

Note: to support client side XSLT on the "file:" protocol the Google Chrome browser needs to be started with the command line flag --allow-file-access-from-files

How to produce HTML only

You can prevent the generation of the XML version of the report (and this page).

This will give you a directory structure just like the one produced by the genhtml tool that ships with lcov.

To do this set the following preference in your lcovrc config file:

jgenhtml_html_only = 1