I have been working with PHPUnit for a little while now, and it\'s starting to look like I may need to break my tests up into groups that would run as separate executions of
Use the "--coverage-php" option to PHPUnit to get it to write the coverage data as a serialized PHP_CodeCoverage object, then combine them using PHP_CodeCoverage::merge, like this:
filter()->addFilesToWhitelist($cov->filter()->getWhitelist());
$codeCoverage->merge($cov);
} else {
$codeCoverage = $cov;
}
}
print "\nGenerating code coverage report in HTML format ...";
// Based on PHPUnit_TextUI_TestRunner::doRun
$writer = new PHP_CodeCoverage_Report_HTML(
'UTF-8',
false, // 'reportHighlight'
35, // 'reportLowUpperBound'
70, // 'reportHighLowerBound'
sprintf(
' and PHPUnit %s',
PHPUnit_Runner_Version::id()
)
);
$writer->process($codeCoverage, 'coverage');
print " done\n";
print "See coverage/index.html\n";
You may also be able to merge the files using a tool named phpcov, as described here: https://github.com/sebastianbergmann/phpunit/pull/685