tntim96 / JSCover

JSCover is a JavaScript Code Coverage Tool that measures line, branch and function coverage
GNU General Public License v2.0
399 stars 84 forks source link

Store tab not showing if I load jscoverage.html from my webserver #203

Closed haitao80 closed 9 years ago

haitao80 commented 9 years ago

I instrumented the JS files and load jscoverage.html within my application serever. The coverage works perfect. The only thing is that the Store tab does not show.

If I load jscoverage.html from JSCover web server, the Store tab shows. But I cannot get any coverage data.

Any suggestion will greatly appreciated!

tntim96 commented 9 years ago

That's easily solved. You can call the JavaScript function jscoverage_serializeCoverageToJSON() and store the results to a file called jscoverage.json which can then be converted to Cobertura XML, LCOV, or viewed directly with accompanying JSCover report files (e.g. jscoverage.html, jscoverage.js - NB the file mode generated jscoverage.js needs jscoverage_isReport = true; appended to view the report).