1

I want to allow my testers to use the development website "as usual" and collect code coverages of every "run", combined everything and be able to say "after 4 hours of tests, here are the 75% of the code that were executed".

I use the php-code-coverage library (https://github.com/sebastianbergmann/php-code-coverage) and everything is working fine except that with xdebug as the tool used for code coverage it's way too slow (10 times slower that without activating php-code-coverage).

I've compiled my own version of php 7.2 with "--enable-phpdbg" and with the help of the command "update-alternatives" I'm able to run in cli :

$ php index.php

and get the code coverage I need, and it's only two times slower (every call to "php" is calling "phpdbg").

But I can't find a way to make it work with apache so that when I'm loading my website it's the executable "phpdbg" and not "php" that is used.

Even if I'm compiling my own ".so" it will still be "php" that will be executed.

Loïc Février
  • 7,540
  • 8
  • 39
  • 51

0 Answers0