brianium/paratest — pull request #64 by julianseeger (2013-10-21 22:06:04+00:00)
Title: Coverage

This PR adds "--coverage-html", "--coverage-clover" and "--coverage-php" to paratest.
(Additionally it fixes some tests that failed before. Probably because of some updated dependencies. The ResultPrinter of PHPUnit now uses "ms")

Why?
Referencing to https://github.com/brianium/paratest/issues/57, coverage is NOT antithetical to paratest (@giorgiosironi).
If paratest is a tool to run tests faster, then it's nice to speed up a long-running Testsuite.
But it is even nicer to speed up a super-painful-long-running coverage-enabled run on this long-running Testsuite.
I've seen Testsuites where the coverage-enabled run took about 12000% the time of a run without coverage, so speeding up coverage is even more timesaving.

What?
Like the --log-junit for the testresults, every process creates it's own coverage file at /tmp/COVERAGE_%TESTID%.php (coverage-php).
After every test has finished, those files are read, unserialized, merged (the functionality already existed at \PHP_CodeCoverage) and written with the requested format.