admin管理员组文章数量:1415111
I need to check the test coverage in my Jscript application. I am using Qunit as unit test framework. I cannot make Jscover works properly. I haven't understood how should I use it, which mand I should issue and which directories I have to specify in the path.
This is the structure of my file system :
JSON/
css/
html/
images/
js/
test/
index.html
The code I want to test is in the js folder, while the qunit test are in the test folder.
I need to check the test coverage in my Jscript application. I am using Qunit as unit test framework. I cannot make Jscover works properly. I haven't understood how should I use it, which mand I should issue and which directories I have to specify in the path.
This is the structure of my file system :
JSON/
css/
html/
images/
js/
test/
index.html
The code I want to test is in the js folder, while the qunit test are in the test folder.
Share Improve this question edited Feb 13, 2013 at 23:26 Ja͢ck 174k39 gold badges267 silver badges314 bronze badges asked Feb 13, 2013 at 23:23 Giuseppe PesGiuseppe Pes 7,9184 gold badges54 silver badges91 bronze badges1 Answer
Reset to default 7You can post this as a question at https://github./tntim96/JSCover/issues, but will try to answer here...
If you run the tests by pointing your browser at the 'index.html' file, and assuming that is in the directory 'c:/your-test-directory', you can run it via the server mode. For example:
java -jar target/dist/JSCover.jar -ws --branch --document-root=c:/your-test-directory --report-dir=target --no-instrument=test --no-instrument=js/lib
I've added '--no-instrument=js/lib' to illustrate how to exclude 3rd party libraries, such as JQuery, from instrumentation.
Then point your browser at http://localhost:8080/jscoverage.html?/index.html
There is more information in the manual too. Let me know how you go.
本文标签: javascriptConfused about how to use JScoverStack Overflow
版权声明:本文标题:javascript - Confused about how to use JScover - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745217412a2648238.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论