Quantcast

JavaScript Plugin Code Coverage

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

JavaScript Plugin Code Coverage

Jason Dobry

Hi,

 

I have been using Sonar’s JavaScript plugin with JsTestDriver, and it has been working fine. However, I would like to generate code coverage reports using a different plugin than JsTestDriver. My problem is that Sonar only reads the coverage file if it is named “jsTestDriver.conf-coverage.dat”, but the plugin I am using now names the file “SpecRunner.html-coverage.dat”. If I rename the file to “jsTestDriver.conf-coverage.dat” then Sonar reads it fine, but it is obviously a necessity that Sonar be able to read files with different names than “jsTestDriver.conf-coverage.dat”. How can I tell Sonar to read a file of the same format, but a different name? Thanks.

 

-Jason


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JavaScript Plugin Code Coverage

Steven Looman
<base href="x-msg://21/">Hi Jason,


Basically, you want to set the property sonar.javascript.jstestdriver.coveragefile.

Hope this helps,

Steven

On Jul 10, 2012, at 7:03 PM, Jason Dobry wrote:

Hi,
 
I have been using Sonar’s JavaScript plugin with JsTestDriver, and it has been working fine. However, I would like to generate code coverage reports using a different plugin than JsTestDriver. My problem is that Sonar only reads the coverage file if it is named “jsTestDriver.conf-coverage.dat”, but the plugin I am using now names the file “SpecRunner.html-coverage.dat”. If I rename the file to “jsTestDriver.conf-coverage.dat” then Sonar reads it fine, but it is obviously a necessity that Sonar be able to read files with different names than “jsTestDriver.conf-coverage.dat”. How can I tell Sonar to read a file of the same format, but a different name? Thanks.
 
-Jason



Loading...