3

I am using theIntern for unit testing my javascript framework. My test is running fine using node.

However, I am not able to generate code coverage report properly. I tried the options provided in the documentation. I was successful to print code coverage information on to the console while testing through selenium web driver. That gives only a summary.

How can I generate extensive code coverage report using reporters other than console?

I provided the "reporters" option but doesn't print the report. Any help would be appreciated.

Kevin Panko
  • 8,356
  • 19
  • 50
  • 61

1 Answers1

1

The lcov reporter generates an lcov.info file that can then be passed to the lcov genhtml utility to output a complete set of HTML coverage reports (the simplest invocation is just genhtml lcov.info).

In Intern 1.2, however, there is a bug with the generated lcov.info files (fixed for Intern 1.3) that may cause genhtml to fail to find any coverage data inside a generated lcov.info file. The patch for this issue is very simple and you should be able to cleanly it to Intern 1.2 until the new version is released in the next couple of weeks.

C Snover
  • 17,908
  • 5
  • 29
  • 39
  • 1
    Thanks for the reply. Looks like genhtml is more for Linux. Should I use JGentHtml if I have to use in windows environment? On a broader note, how can I automate all these steps of running the unittest and generating code coverage? Is there any maven plugin that can do all these? – user2880454 Oct 15 '13 at 15:43