Description
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.