Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming coverage data to file at runtime #737

Open
rask opened this issue Mar 24, 2020 · 0 comments
Open

Streaming coverage data to file at runtime #737

rask opened this issue Mar 24, 2020 · 0 comments

Comments

@rask
Copy link

rask commented Mar 24, 2020

Not a bug, but more of a idea/feature request.

Would it be possible to take a look at making coverage reporting streamable into a file at runtime, in small chunks? E.g. when PHPUnit is running, this library would stream coverage metrics somewhere during testing, and not at the end of a test suite.

Example:

Test run starts, and a file is created e.g. coverage.csv or similar.

When testing, after each test case, the test case's coverage data is dumped into coverage.csv.

After all tests have run, we can either stop and use the coverage.csv report using some other tool, or then we can read it at the suite end and generate normal reports as we do now.

What this would solve is that in larger code bases the reporting step at the end of a test suite might run out of gigabytes of memory. I presume streaming into a file in chunks would ease with the memory usage a bit, and would allow coverage reporting to be done in multiple steps if needed, e.g. PHPUnit writes coverage.csv, and a custom tool generates a Clover file from that or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants