Selenium: Is there any JS (JavaScript) code coverage tool which we can integrate with Selenium Server/RC

Abhinav Garg picture Abhinav Garg · Feb 29, 2012 · Viewed 8.5k times · Source

Selenium: Is there any JS (JavaScript) code coverage tool which we can integrate with Selenium Server/RC

Hi,

I want to JS code coverage done by my Selenium Test Suite

Is there any code coverage tool which can be integrated with my existing selenium rc framework??

Answer

Ates Goral picture Ates Goral · May 17, 2012

In theory, you can use any coverage tool that instruments JavaScript code to collect coverage data.

For example, you can use JSCoverage either in proxy mode (for real-time instrumentation) or for static instrumentation to run your Selenium tests off the instrumented code.

One technical hurdle could be to devise a way to accumulate coverage data across multiple pages. The coverage tool of your choice could already have support for accumulation of data from multiple page runs. If not, you might have to handle that bit yourself, but this is probably not something trivial.