Comments (9)
From some quick googling it looks like there are some utilities out there for Istanbul, which is the coverage utility that this addon uses.
To get combined coverage, you'll likely have to run an additional command on the results of each partition.
from ember-cli-code-coverage.
ya, that makes sense
We should track down the required commands / tools and figure out how to make them play nicely together. We have a few options there:
- Make ember-cli-code-coverage detect ember-exam and do the right thing automatically
- Make ember-exam detect ember-cli-code-coverage and do something...
- Document in both the ember-exam and ember-cli-code-coverage README's what the solution is
/cc @trentmwillis for his thoughts/opinions
from ember-cli-code-coverage.
There is an open issue on ember-exam to explore this as well: ember-cli/ember-exam#18. There's not much there, but a conversation with @stefanpenner about that issue led to this RFC: ember-cli/rfcs#57.
It is definitely possible to coalesce multiple coverage reports together, but we want to make sure we find a good interface to support this across the board (including potential future code coverage solutions). As of right now, I don't have many more thoughts than that.
from ember-cli-code-coverage.
The trick is that each addon needs knowledge from the other. Ember-exam would need to know that coverage was being run and what to call to combine reports OR this addon would need to know that the test suite had been split and be configured to write coverage to different locations for each run.
An early plan that I think could work:
- Add a command to ember-cli-code-coverage that combines several coverage reports
- Document how to configure coverage to write to a different folder for each ember-exam run
- Add a callback/hook to ember-exam to be able to call a command after the parallel runs with some info about the runs.
- Document how to call the combine code coverage command from that hook. Bonus: Make a ember-cli-code-coverage-and-exam addon that does this configuration for the user.
from ember-cli-code-coverage.
I don't think this addon needs to know about ember-exam at all. Maybe I'm missing part of the picture, but I think it should be sufficient to just do the following:
- Expose an option to let ember-cli-code-coverage know there will be more than one coverage report.
- When
POST
ing to/write-coverage
, include identifiable information in the payload, such as current test url and maybe browser UA. - Given 1 and 2, have the middleware write each coverage report out to a separate location.
- On process exit, merge the multiple reports into a "final" report.
In my opinion, it could be sufficient to have 4 be a separate command that consumers run themselves (since it may be difficult to hook into the process "exit" event).
I also want to note that ember-exam doesn't really do anything special as far as the actual "test process" is concerned; it runs tests in parallel simply by configuring Testem and modifying TestLoader
at runtime. This is why I don't think ember-exam should actually have any knowledge of this process, as it is really just sugar on configuration and doesn't do anything with the process output.
from ember-cli-code-coverage.
I had wild misconceptions about how ember-exam worked; your plan sounds doable.
from ember-cli-code-coverage.
I've just been working on this as part of trying to speed up our product build time, should have a PR soon for a merge-coverage command that creates a consolidated report - just needs a bit of clean up.
from ember-cli-code-coverage.
There is a PR available here:
from ember-cli-code-coverage.
Should be solved by #83
from ember-cli-code-coverage.
Related Issues (20)
- Unexpected token { error
- [QUERY] Is it possible to generate the coverage for a specific file/spec module (integration) HOT 2
- Issue with migration to v2.0.0
- No coverage report generated when used with @embroider/compat@^2.1.0 HOT 10
- Exclude app files from ember engine? tried with many glob patterns nothing is working..
- Socket timeouts POSTing to /write-coverage when running tests in CI mode HOT 3
- Not respecting "inputSourceMap" field from reported coverage data (fails for .gjs - ember-template-imports) HOT 2
- New release? HOT 10
- Coverage not collected in Embroider >3.1 HOT 6
- Is it possible to get coverage of hbs files with qunits and this coverage tool? HOT 1
- Issues with first-class component templates? HOT 12
- Embroider Tests are verifying that we have no coverage data HOT 1
- Version 2.0.1 not published HOT 1
- Coverage fails in dev mode (ember serve) on 2.0.3 HOT 2
- Coverage for gjs/gts files do not work for embroider apps HOT 17
- Add workflow that creates a dist branch HOT 2
- Coverage is not produced when `-s` is not included
- Ability to collect and report coverage in development
- Use on WSL test runs
- modifyAssetLocation is not called for paths starting with ".."
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-code-coverage.