sebastian bergmann 
›
Even More Work on Reporting in PHPUnit 3
When I
moved to Norway just over a month ago, the
Code Coverage Reporting of
PHPUnit 3 needed almost
six hours to run the test suite and generate a
Code Coverage report for the
eZ components.
Then
Derick Rethans committed a patch to
Xdebug that introduced "
a cache that prevents the code coverage functionality from running a ''which code is executable'' check on every function call, even if they were executed multiple times". This patch reduced the time spent on running the tests dramatically. It now took only
two hours to run the test suite and generate the report.
Over the past couple of days, Michael Lively Jr.,
Jan Kneschke, and myself used Xdebug's profiling functionality to locate "hot spots" in PHPUnit 3's report generator. After optimizing most of these hot spots (
I am not proud of all of these patches), the initial six hours have been reduced to
eight minutes.
Wow.
I am also working on a "logger" that writes all information that is gathered during the execution of a test suite to an
SQLite database. Think of this feature as the basis for a tool like
CruiseControl. A web application queries this database and would allow, among other things, the analysis of differences between test runs: Which commit (by which developer :-) made a test fail? Which commit incurred a performance penalty?
The possibilities are virtually endless ;-)