Even More Work on Reporting in PHPUnit 3

Sebastian Bergmann » 14 June 2006 » in New Features » 3 Comments

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 ;-)

Trackback specific URI for this entry

3 Comments to "Even More Work on Reporting in PHPUnit 3"

Display comments as (Linear | Threaded)
  1. Pierre
    14/06/2006 at 15:53 Permalink
    Sounds good, very good. Congratz, I'm looking forward to the final release of PHPUnit3.

    Reply

  2. Mike
    14/06/2006 at 17:16 Permalink
    I think the patch you linked to seems like a use case for SplObjectStorage?

    Reply

  3. Sebastian Bergmann
    14/06/2006 at 17:20 Permalink
    Yes, but SplObjectStorage is not available in PHP 5.1.

    In a later version, PHPUnit 3.1 for instance, we will revert this patch and implement the functionality needed in a proper way using SplObjectStorage, thus bumping the PHP version dependency to PHP 5.2.

    Reply

0 Trackbacks to "Even More Work on Reporting in PHPUnit 3"

  1. No Trackbacks

Add Comment


To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Submitted comments will be subject to moderation before being displayed.