Add coverage-merge command and parallel configuration - #83
Conversation
…th parallel testing.
76d24ec to
02f255d
Compare
|
@jdenly that sounds great. One question. Will that suppress multiple coverage reports being written to the console in favour of one merged? (I failed to find this in code, but maybe I'm missing sth). |
|
@gustaff-weldon I'm not seeing coverage reports being displayed on the console at all. How do you run your tests? What type of reporters do you have configured? This just changes the coverage writing mechanism to write to multiple directories, coverageFolder suffixed with a random string, for example coverage_abcdef12 and coverage_efef1212. Once you're finished, you can merge them into the coverageFolder using ember coverage-merge.
You need to manually remove all coverage folders between runs - this is sufficient for our use case of running on a CI server as it cleans up between runs. Thinking about it it might be better to delete the coverage_* directories after merge. |
|
@jdenly you can add/change reporters in the config] |
|
@jdenly Thanks for this and sorry for taking so long to respond to this. I was wondering if you'd be willing to add a bit of a smoke test for this, similar to what we have https://github.com/kategengler/ember-cli-code-coverage/blob/master/test/integration/coverage-test.js#L23 but checking for the results of the merged report? I won't block merging this PR on it (I'm about to do so) but would really appreciate the test. |
|
@kategengler No worries, I've added a test under #92. |
Allows use of parallel testing with ember-exam or similar.
Additional configuration flag
parallel, when set to true will output coverage into multiple directories, with a random suffix. Thecoverage-mergecommand can then be used after the build to merge them together.