robwhitby/xray — pull request #17 by rbwinslow (2012-10-04 22:00:33+00:00)
Title: Code coverage feature from Michael Blakeley

This work was done for Zynx Health, so we are checking the change in on our
fork. Apologies for having checked this into master.

Here is a description of the feature from the man himself:

There's no UI for specifying the coverage-module arguments yet. To run
xray's own unit tests with code coverage enabled, use a URL like this one:

http://localhost:8889/xray/?dir=xray/test&modules=&tests=&coverage-module=/xray/src/assertions.xqy&coverage-module=/xray/src/utils.xqy&format=html

Any number of 'coverage-module' URIs can be specified. If there are no
coverage-modules specified, no code coverage will be run. Once you have
the html report, you can click on the links in the code coverage summary
to display the details for a module. That display also supports xml and
text formats.

It turned out that I could support unit testing and code coverage in the
same run, too. Code coverage is disabled for format=xunit, because xunit
doesn't seem to have schema support for code coverage. But format=xml
shows the full line info, and text shows summary information without
links.