qa:whattotest

This is an old revision of the document!


More information on what to test

There are currently independent efforts underway to improve the testing for the IMAP and GD extension. Therefore these two extensions should not be focused on during a testfest in May 08.

Some scripts

You can tell a certain amount from line coverage - but it doesn't really show you exactly what tests there are already for specific functions.

I've put the source code for two scripts below - both are a little unfinished, I will go on tidying them up.

1) This script runs through all of the phpt tests in the source tree and then compares the function calls in the tests with a complete list of PHP's internal functions. At the end it will tell you if there is a function in PHP that is not mentioned in any test case (I get 415). Thanks to Damien Seguy for this.

Script 1

2) A slight modification to Damien's script. In this case the script will print out what test cases each function is mentioned in. This doesn't mean that the function is properly tested in each one, just that it's used. For example, if you look at the output for 'cos' you will see three tests which are clearly meant to be testing 'cos'. Look at the output for 'var_dump' and you'll see that it's used in 100's of tests - but is it really tested in any of them?

Script 2

qa/whattotest.1210086091.txt.gz · Last modified: 2017/09/22 13:28 (external edit)