Closed achan closed 9 years ago
@achan The blanket documentation is a little scattered https://github.com/alex-seville/blanket#blanketjs, but it supports custom reporters, so the ability to generate lcov reports is definitely a possibility. I've also seen some examples (I can't remember where) that demonstrated running headless with PhantomJS, so running via ember test should also be a possibility.
Currently the integration project doesn't support either of these. I may find time to investigate this eventually, but the current level of coverage reporting meets our project's needs, so it's taking a back seat to other framework projects. If you're interested in investigating either or both of these issues let me know and I'd certainly be happy to give you a hand in finding the hooks/explaining the current integration setup. I do intend on enhancing this project in the future, but it's definitely going to move faster if other people want to get involved.
I've forked the repo and I'll see how much work it would take to get this running headless first...
thanks @achan for looking into command line interface I would totally use it. cheers
We're going to start looking into the headless run as well as LCOV reports that can be fed into systems like Sonar or TeamCity. @achan Have you made any progress looking into this that we could build on?
Nope sorry, not able to work on this at the moment..
@achan No problem, just wanted to make sure we didn't duplicate effort.
@achan Let me know if I can help with the headless coverage reports either testing or coding.
@kiwiupover I'm pretty much not involved with this issue other than creating it.. I believe @sglanzer is your guy :)
Ok I get it.
@sglanzer - I would like to get involved.. Our team really needs headless tests, and custom coverage reporting. I have some spare time to spend on this because it is the only item keeping our team from onboarding to ember-cli :)
Could you please point me to the necessary hooks as you mentioned above? I would love these features :)
@grese Excellent, getting this feature would be great.
https://github.com/alex-seville/blanket/tree/master/test/custom-reporter is the basic blanketjs example for custom reporters.
This appears to be reasonable example for running with phantomjs and a custom reporter: https://github.com/ModelN/grunt-blanket-qunit
That uses grunt but I would imagine that it could also be driven using testem (standard ember-cli).
The current implementation takes the result of the ES6 to ES5 conversion performed in the ember-cli build, loops over the entries store in the requirejs.entries list, instruments each entry using blanket, loads all of the entries and then lets qunit start the test run (there is a flag set to block the run until the entries have been loaded).
The mocha case is a bit different, @mheisig did the work for mocha, so if you want to go that route he would be able to give you more information.
I know this isn't a lot to go on, but let me know if I can do anything else to help.
Another note - I'm not a fan of how the project hooks into ember-cli currently, it was a hack effort and I think modifying the instrumentation to run during the postProcess hook http://hashrocket.com/blog/posts/a-compendium-of-hooks-in-embercli#postprocess would be a better idea.
If you can get the headless runner going with the current implementation, cool - otherwise we may need a bit better control over the execution and I think that hook might be the right way to get better control.
I've managed to get the lcov file working when the user hits localhost:4200?coverage=true (with both mocha and qunit), but still need to get it working in the headless runner...(that's where the bulk of the work will be, I suppose.).
Thanks for the pointers :) I'll also look into the hooks while I'm at it because I think your're correct - (we will probably need more control to make this work in headless runners).
@grese, could you publish your work thusfar? I'd love to see it :+1:
It has been a couple of days, since @grese posted that he working on a approach of tackling headless coverage.
Does anyone have new information about that? I'm really interested in this topic as well.
I dug into this a few days ago while looking @ the overall coverage updates
Stating the obvious we need to: [] generate an lcov report from blanket [] get the lcov report written to the filesystem
I'm working on a POC using an ember test middleware to take the results when the the blanket test ends.
setting up the lcov reporter is a bit of PITA but I'm close - will advise
I'm new to ember-cli and Ember in general, but is there a way to run blanket from command line? Any options to enable it via
ember test
? Moreover, is there an easy way to generate lcov reports to feed in to services like coveralls / code climate?