My Photos

www.flickr.com
This is a Flickr badge showing public photos and videos from coogle. Make your own badge here.

Quicksearch

Code Coverage Support for PHP 5

Wednesday, July 27. 2005

Wow, I've been busy...

I knew when I started getting e-mails from people asking me if I was still alive, where I disappeared to, etc. that things were getting a bit excessive. I haven't blogged in a month or so, and even my friends in the internals community haven't seen me online. A lot of them did see me at ApacheCon 2005 Europe last week, which was a great conference -- one of the best I've been to in a long time. But for those who haven't heard from me lately and were wondering what was going on, Zend has been keeping me quite busy! For starters, me and Chuck (from Horde Fame wrote the PayPal SDK for their web services. It's a pretty awesome codebase I think, and I'm told by my friends at PayPal that the PHP version of the SDK is being downloaded substaintially more than the Java or .NET version which surprised them. Who would have thought right? :) So I've been busy doing that, working with other clients (sorry I'd have to kill you if I told you), etc. In fact right after I landed from Germany I had to catch a flight the next day to LA to do some emergency client work.

Anyway, while I was at ApacheCon I got to talking to some of the Apache Software Foundation members about PHP. As you know, in the past I've been a little critical of their newest web server version (Apache 2.0) and it turned into quite the thing when Slashdot picked up my comments. The big issue when it came to PHP has always been that PHP just isn't thread safe in a "practical" environment, so there wasn't a lot of motivation to move to a new untested code base. After talking to some really bright guys at ApacheCon this year over a few beers, I decided I'd take a stab at trying to solve the thread safe issues revolving around PHP (maybe I had too many beers ;)). To do this however is going to require almost every line of code being tested and I wasn't sure how much of our existing test suite was going to do the job. So I've implemented code coverage support for PHP through the libgcov library and LTP project (thanks to Theo Schlossnagle for suggesting it).

Code coverage is basically the idea that when I execute an application I want to know exactly which lines of code got executed. When you put that in the context of a test suite, it can tell you exactly how effective your test suite is at testing your code base. That's what I've come up with PHP, all I need is for PHP 5.1 to branch in CVS before I commit my patches.

For those of you who are curious, PHP's test suite covers roughly 48% of the code base -- which I'm told since we've never actually had a number to go with this before is a pretty good start. If you'd like to see a line-by-line analysis of what extensions are best tested, check out this great HTML report of a line-by-line analysis of covered code.

Feedback welcome! Maybe this will motivate those of us in the internals community to add more tests, increase the overall coverage percentage, and bring us one step closer to fixing threading issues with PHP extensions. After all, now it's a matter of pride.

Trackbacks

No Trackbacks

Comments
Display comments as (Linear | Threaded)

No comments

The author does not allow comments to this entry

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c02/h04/mnt/28311/domains/blog.coggeshall.org/html/include/plugin_api.inc.php on line 562

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c02/h04/mnt/28311/domains/blog.coggeshall.org/html/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php on line 451

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c02/h04/mnt/28311/domains/blog.coggeshall.org/html/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php on line 476

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c02/h04/mnt/28311/domains/blog.coggeshall.org/html/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php on line 520

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c02/h04/mnt/28311/domains/blog.coggeshall.org/html/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php on line 819

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c02/h04/mnt/28311/domains/blog.coggeshall.org/html/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 316

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c02/h04/mnt/28311/domains/blog.coggeshall.org/html/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 360