Help needed: Code coverage in phpunit phpt testing
| From: | Christian Weiske | Date: | Thu, 05 Jul 2007 14:05:13 +0000 |
| Subject: | Help needed: Code coverage in phpunit phpt testing | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-47210@lists.php.net to get a copy of this message | ||
Hello all,
Having the daily tests support PHPUnit-style tests is nice, but quite some packages use .phpt to
write unit tests.
I already got running .phpt from within phpunit tests working [1], but an important feature, code
coverage, is missing. Since .phpt tests are executed in a new php instance, phpunit does not catch
any coverage. It is possible to let PEAR_RunTest generate xdebug coverage output into a file that
can be read after running the test.
This informatin has to be injected into phpunit somehow, so that the report generator can cover
tests run by the assertPHPT-task, too.
Sebastian Bergmann already assigned the issue to himself, but it seems as if he wants to integrate
the phpt functionality in php4 only, which will take some time and is IMO too late. If someone could
hack and provide a patch against phpunit that enables code coverage reports for .phpt tests could
a) perhaps convince sebastian that the feature can go into the next version of phpunit
b) instantly have all the phpt-using packages tested as well plus having nice coverage reports.
[1] http://phpunit.de/ticket/149
--
Mit freundlichen Grüßen/Regards,
Christian Weiske