Developer documentation ======
*[[http://wiki.php.net/qa/runtests/documentation/commandline|Command... ======
runtests is a test environment written in PHP. It is used to test PHP itself.
It is not a replacement for unit test frameworks like PHPUnit.
The basic principle of automated tests is v
tting up development environment ======
run-tests.php is a PHP script so all you really need is a fairly standard development environment. This is a brief s... ode this page is not for you - look [[http://wiki.php.net/qa/runtests/howtorun|here]]
==== Installing PHP ====
* Download the PHP 5.4.0 source tar
*
====== run-tests.php command line options and environment variables options ======
===== Short Options... ^ implemented ^
| h | | help | yes | yes |
| p | PHP_TEST_EXECUTABLE | Specifies PHP executable to be tested | yes | yes |
| v | | Writes the PHP command that's passed to proc_open(), and ... | y
====== Running the new version of run-tests.php ======
===== Extract the code =====
Checkout the code from the PHP git repository like this:
<code>
git clone http://git.php.net/repository/phpruntests.git
</code>
Under the phpruntests directory you will find all the source c
name ^Reason for difference ^
|6 tests fail in phpruntests and do not fail in run-tests | | |
| | ext\standard\tests\general_functions\phpinfo.phpt|Occasional fail – can't explain |
| | tests\basic\bug20539.phpt |This warns and skips in the old version, we are
name ^Reason for difference ^
|5 tests fail in phpruntests and do not fail in run-tests | | |
| | ext/standard/tests/general_functions/phpinfo.phpt | ? |
| | ext/standard/tests/strings/htmlentities02.phpt | This test fails when mbstring is configd. It f
name ^Reason for difference ^
|4 tests fail in phpruntests and do not fail in run-tests | | |
| | ext/standard/tests/general_functions/phpinfo.phpt | ? |
| | ext/standard/tests/strings/htmlentities02.phpt | This test fails when mbstring is configd. It f
name ^Reason for difference ^
|1 tests fail in phpruntests and do not fail in run-tests | | |
| |ext/standard/tests/general_functions/phpinfo.phpt |Occasional fail – can't explain |
|1 tests fail in run-tests and do not fail in phpruntests | | |
| |ext/standard/tests/mail/mail_va
====== Requirements for run-tests.php ======
There are three main reasons to re-write (or re-factor) the existing run-tests.php code, these are:
* The number of core PHP test cases has increased from about 3000 at the beginning... e will have have many thousands of test cases for PHP so the problem will get worse. The only solution
======= phpruntests performance =======
===== execution-time =====
The following chart shows how the new phpruntests performs with a different number of proce... ts-script which was our benchmark.
[[http://wiki.php.net/_media//qa/runtests/documentation/performance... }
===== cpu-usage =====
As you can see the new phpruntests is able to exhaust the cpu much more bett
Coding Standards ======
* Use the [[http://pear.php.net/manual/en/standards.php|PEAR coding standard]] (22/04/2009 - see php-qa list for concerns)
* Deviation from the standard: Do... th rt (Reason: avoid name conflicts with built-in PHP classes)
* We do not follow the original PEAR c
* Report times in whole seconds (no dp)
* Add .phpt to end of file name in output
* Should the def... -vvv
* Package as a single file (like run-tests.php)
* Add a test using --disable-all and check tha... for parallel code on wiki (G, done: [[http://wiki.php.net/qa/runtests/documentation]])
* Fully explai
==
All differences are reported for the standard PHPT QA set - see [[http://wiki.php.net/qa/runtests/development|here]] for a description of the test set a