You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I collect Xdebug Coverage data while running integration tests with PHPUnit + Selenium Hub inside a Docker machine. I then collect the code coverage data, merge the ones that belong to the same test and use PHP_Code_coverage to generate a report in clover and HTML.
This works great, with one caveat. The exported coverage files are sometimes several megabytes and merging them is very CPU and memory intensive.
Without XDebug, merging these takes a few seconds, with XDebug in Coverage mode this balloons to several minutes. In order to run it without xdebug I added this rather horrible shim:
defined('XDEBUG_FILTER_CODE_COVERAGE') || define('XDEBUG_FILTER_CODE_COVERAGE', 1);
defined('XDEBUG_PATH_INCLUDE') || define('XDEBUG_PATH_INCLUDE', 1);
if (!function_exists('xdebug_set_filter')) {
function xdebug_set_filter() {};
}
putenv('XDEBUG_MODE=coverage');
$coverage = new CodeCoverage(
(new Selector)->forLineCoverage($filter),
$filter
);
putenv('XDEBUG_MODE=');
It does the job, but I wish I could just process the code-coverage data without the need to either move the merging of the data to an external process or having to resort to a hack like this. It should be rather simple to pass an argument to the selector or provide an environment flag that disables checking when it's not needed.
Thank you again for the amazing work <3
The text was updated successfully, but these errors were encountered:
Hi,
I collect Xdebug Coverage data while running integration tests with PHPUnit + Selenium Hub inside a Docker machine. I then collect the code coverage data, merge the ones that belong to the same test and use PHP_Code_coverage to generate a report in clover and HTML.
This works great, with one caveat. The exported coverage files are sometimes several megabytes and merging them is very CPU and memory intensive.
Without XDebug, merging these takes a few seconds, with XDebug in Coverage mode this balloons to several minutes. In order to run it without xdebug I added this rather horrible shim:
It does the job, but I wish I could just process the code-coverage data without the need to either move the merging of the data to an external process or having to resort to a hack like this. It should be rather simple to pass an argument to the selector or provide an environment flag that disables checking when it's not needed.
Thank you again for the amazing work <3
The text was updated successfully, but these errors were encountered: