Monday, 4 August 2008

PHP test coverage

I thought it might be interesting to compare the PHP test coverage from before the 2008 testfest with today's test coverage.

Here are two sets of gcov results - one based on a CVS extract of PHP 5.3 from May 1st 2008 and the second based on a CVS extract of PHP 5.3 from August the 1st 2008.

I had to copy a few files into odd places to make lcov run, however since I copied the same files in both source trees I think the results are comparable, even if they look a bit odd in places.

We know that 158 new tests came in from people submitting tests to the testfest site, three of the areas that these were targeted for improvement were ext/dom, ext/reflection and ext/exif. Here is how the coverage changed in these extensions:

/ext/reflection went from 73.6 up to 84.6

/ext/dom went from 56.7 to 60.3

/ext/exif went from 44.2 to 57.1

An average of nearly 10% over the three of them.

I'm looking forward to helping to run 2009 testfest. If we build on the successes of the 2008 we could aim to get several more extensions up to the same coverage as reflection.

No comments: