PHPT (testfest) writing resources

The PHP TestFest month is almost over and we can already probably say it was quite a success. Of course it would be great if some of the test writers continue to occasionally write a new test or two, and for this occasion, I thought it would be handy to have a resource listing of presentations, websites and pdf’s that cover PHPT testing. Although I believe this is a decent list of resources I’ve actually used myself, I’m probably missing some, so this will be a work in progress and updated once in a while. :-)

First, some of the official PHP resources on PHPT testing (pretty much all of qa.php.net is relevant here):
http://qa.php.net/write-test.php
http://qa.php.net/running-tests.php
http://qa.php.net/tested-methods.php
http://qa.php.net/testfest.php
http://qa.php.net/phpt_details.php
http://wiki.php.net/qa/testfest

GCC code coverage page for PHP, which shows test code coverage for the most popular CVS branches. Some graphs and other compiling, testing and analysing information is also available:
http://gcov.php.net

This is the place you’ll need to go to acually submit tests if you don’t have CVS commit karma yet (it’s good for overall testing statistics too):
http://testfest.php.net

Next is a blog post on what Josie Messa has learned while writing tests. Interesting article which shows a lot of real code examples and issues that she dealt with while writing PHPT tests:
http://jmessa.blogspot.com/2008/05/lessons-learned-in-phpt-writing.html

Slides by Sebastian Bergmann, useful to prepare yourself for writing tests. This presentation tells about what PHPT testing is all about, how to properly write tests, and how you should prepare for testfest:
http://sebastian-bergmann.de/archives/777-PHP-Test-Fest-Slides.html

This is an article I wrote, explaining a way to set up Mac OS X for writing PHPT tests. This doesn’t use the built in PHP distribution but instead prepares the OS for manually compiling and running PHP from CVS, with code coverage and all the goodies:
http://felix.phpbelgium.be/blog/2008/05/22/writing-phpt-tests-on-your-mac/

Presentation by Marcus Börger with pretty extensive overview on testing (and PHPT testing in specific). This is one of the most complete presentations on the subject I could find:
http://somabo.de/talks/200703_montreal_need_for_testing.pdf

The blog of Zoe Slattery, which has 2 posts (and much more to come, undoubtly!) about testing PHP and PHP TestFest:
http://zoomsplatter.blogspot.com/

This is the official website of the PHPT testing framework:
http://phpt.info/

Of course you’re best off grabbing a CVS checkout of the PHP_5_3 (or 6_dev) source tree:
http://www.php.net/anoncvs.php

In the CVS checkout of the PHP source code, there is a interesting README file called README.TESTING. It provides useful information on how to test, testing conventions, how to handle failed tests and more:
http://cvs.php.net/viewvc.cgi/php-src/README.TESTING?revision=HEAD&view=markup

If you have questions regarding writing PHPT tests, there are several ways to go. First off, you can ask away at the IRC channel #phptestfest on irc.freenode.net. For any kind of QA or testing related question, you can also mail php-qa@lists.php.net mailing list, and subscribe to the mailing list on http://www.php.net/mailing-lists.php.

0 Responses to “PHPT (testfest) writing resources”


  • No Comments

Leave a Reply