TestFest: What should user groups write tests for?
| From: | zoe | Date: | Fri, 08 May 2009 09:09:04 +0000 |
| Subject: | TestFest: What should user groups write tests for? | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-64898@lists.php.net to get a copy of this message | ||
Hi
I've been asked this a few time in private mails, it's a long answer so I thought it was worth a note to the list. Hope this helps.
The first point is that it's great to think about it in advance. You are much more likely to have a successful day if the people who turn up know in advance what extension or set of functions they will write tests for.
User groups can vary a great deal in terms of levels of PHP expertise, so part of your decision has to reflect what your group will feel comfortable with. Part of it also should be dependent on what your mentor feels happy to review and commit in CVS. For example, Quebec chosing to test date/time with Derick as a mentor was a pretty smart move.
After that, choosing an area to look at should start with the gcov pages. The first place to look is here:http://gcov.php.net/PHP_5_3/lcov_html/, that is the main page for 5.3 coverage. Scroll down a bit and you will see that the curl extension is not well tested, the dom extension could also do with more tests. Curl is notoriously difficult to test, BUT, if you have expert curl user in your group - go for it! Dom is fairly easy, but again, your user group needs to be happy with OO PHP and know a bit about what the dom extension does.
If your user group is new, just starting with PHP, I'd look at the standard extension. Most of the functions are pretty well covered but, for example, in math.c I can see there are still some red lines indicating code that isn't tested.
After you have looked at the test coverage, look at the list of tested functions http://gcov.php.net/viewer.php?version=PHP_5_3&func=tested_functions. This shows you functions that are not hit by any of the existing test cases, so you can pick something from that list too.
When you've picked an area that looks good you should check the wiki.php.net/qa/testfest and make sure that you haven't chosen something that is already being worked on by another group. Then check the tests that have already been written testfest.php.net/displayresults.php to make sure that someone hasn't already written the tests that you were thinking of doing.
Finally - update wiki.php.net/qa/testfest to say what you are planning to do! If you don't have access to the wiki, just mail this list and one of us will update it for you.
Really finally - if you don't get any of this sorted out in advance - it's not the end of the world. If we end up with 5 different basic tests for some_function() it's still better than having none at all. Only one of them is likely to make it into the PHP distribution though :-)
Zoe