qa:whattotest
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
qa:whattotest [2008/05/07 12:47] – minor format changes zoe | qa:whattotest [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== More information on what to test ===== | + | ====== 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. | 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 ==== | + | ===== Some scripts |
- | You can tell a certain amount from line coverage - but it doesn' | + | You can tell a certain amount from line coverage - but it doesn' |
- | I've put the source code for two scripts below - both are a little unfinished, I will go on tidying them up. | + | I've put the source code for three scripts below - they are a little unfinished, |
- | **Note** Both scripts look at **functions** and are not any help if you are looking at a PHP 5 OO extension. | + | |
- | 1) This script runs through | + | The first two scripts will tell you about functions that are not tested at all and which tests call a given function. The third script does something similar for class methods. This isn't quite as easy as looking for functions, but there is still some useful information. |
- | === Script 1 === | + | |
+ | ==== Script 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. | ||
<code php> | <code php> | ||
<?php | <?php | ||
Line 87: | Line 88: | ||
</ | </ | ||
- | 2) A slight modification to Damien' | ||
- | |||
- | === Script 2 === | ||
+ | ==== Script 2 ==== | ||
+ | A slight modification to Damien' | ||
<code php> | <code php> | ||
<?php | <?php | ||
Line 174: | Line 174: | ||
==== Script 3 ==== | ==== Script 3 ==== | ||
+ | This script lists all the classes in PHP and then finds their methods using a ReflectionClass. Using essentially the same logic as the other two scripts teh code searches for tests that refer to these methods. The script is flawed in that many classes have methods of the same name (for example %%__toString%% occurs in many classes), so looking for all tests that refer to %%__toString%% will give a list of mainly irrelevant tests. Because of this I've excluded any method beginning " | ||
<code php> | <code php> |
qa/whattotest.1210164439.txt.gz · Last modified: 2017/09/22 13:28 (external edit)