qa:runtests:development

This is an old revision of the document!


Setting 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 set of instructions.

Installing PHP

  • Download the PHP 5.4.0 source tar
  • Extract into /the/place/you/keep/php/souce
  • cd /the/place/you/keep/phpsource/
  • configure --with-zlib --enable-pcntl
  • make
  • sudo make install

This gets a recent copy of PHP installed in /usr/local

Installing other things

Now you need:

  • PHPUnit (which you should be able to install using pear)
  • Phing (likewise)
  • Doxygen (download, extract, configure, make sudo make install)
  • Xdebug 2.2.0 (download and build). Follow the Xdebug instructions carefully - make sure that your php.ini is poining to the right xdebug.so.

Check that you have all this using php -m.

Getting the development version of parallel run-tests.php

git clone http://git.php.net/repository/phpruntests.git

Under the phpruntests directory you will find all the source code under the directory /src and all of the unit tests under the directory /tests. The main program is called run-tests.php. The main program is located in the directory /src.

Checking that the code is working

The source code comes with a set of PHPUnit test cases and a QA test suite, all of this is controlled in a php build.xml file.

Before running the tests you must set up a configuration file. You will find phpdefinitions.txt.sample in the phpruntests directory. Copy it to phpdefinitions.txt and modify the settings to suit those on your system.

Unit tests

phing test

QA

 
phing qa

This will run unit tests first and the go on to run a standard test bucket, first with the old version of run-tests.php and the with the new version (in sequential mode). A php script is used to compare the results of the new and old versions. Look in phpruntests/_compare for a results file.

At the moment (18th May 2012) you can expect a few differences in the output from the old and new versions of run-tests.php. These are mainly due to REDIRECTTEST not being implemented and a few other small differences in tests which need to be fixed.

qa/runtests/development.1337368804.txt.gz · Last modified: 2017/09/22 13:28 (external edit)