Open tntim96 opened 10 years ago
How would you suggest I allow the user input these parameters? Thru the command-line or inside the build file... Also, in your opinion which options are the MUST support and the SHOULD support... thanks for your feedback. I'm very happy you took the time to check out the project! :)
Not sure yet - am looking at the documentation for plugins, plugin best practices and this list of existing plugins. It's probably worth looking at how some of those plugin work.
in your opinion which options are the MUST support and the SHOULD support
Not sure I can comment without knowing the test infrastructure defaults and how much the tests can vary, but normally you'd need at least:
--no-instrument
so you're not recording coverage on libraries like JQuery which aren't needed and slow the tests--local-storage
which will store the coverage between pages loads without using iFrames or JavaScript related windows. You might need a couple of tests in your example to see this work.The file-system options are listed here
Wow, so if I understand you correctly, then "--local-storage" is very important. So if I have a test case that navigates to multiple pages-- ie go to page1 "do something" go to page2 "do something"-- in this situation-- I will only see coverage pertaining to the last page, not the entire set of pages that were touched UNLESS i use "--local-storage" option? is my understanding correct?
If that is the case then I would argue that "--local-storage" should be on by default-- because its more intuitive to think that if i run a functional test case that navigates across a set of pages I would like coverage to pertain to all pages/javascript that was used during the test. Just my thoughts
Yes, I've made it the default in the maven plugin (see line 37 of JSCoverMojo)
Ok, I made the --local-storage
default and I added support for --no-instrument
I also updated the example to be have "more"... I will close this issue after I get your feedback.
Thanks
Looks OK and runs OK. Couple of questions though:
Why do you store the JSON and original-src separately to the other jscoverage files?
I actually can't remember, what is the best approach in your opinion?
I use eclipse IDE -- i just do "play eclipse" or "sbt eclipse" to create the project files...
And then when i go into eclipse I import the directory of the project as an existing eclipse project...
Usually all the JSCover report files (jscoverage.html
, jscoverage.js
, etc...) go in the same directory with the original-src
so the report can be viewed with jscoverage.html
.
Re: play eclipse
Is there an activator equivalent command?
Could make example a bit more elaborate with
--no-instrument
but need support for JSCover's options.You may be able to use ConfigurationForFS.java as done in FileMojo.java and JSCoverMojo.java in the jscover maven plugin, which then runs