qa:runtests:development
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
qa:runtests:development [2012/05/18 19:20] – zoe | qa:runtests:development [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Setting up development environment ====== | ====== 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. | 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. | ||
+ | If you just want to **run** the code this page is not for you - look [[http:// | ||
==== Installing PHP ==== | ==== Installing PHP ==== | ||
* Download the PHP 5.4.0 source tar | * Download the PHP 5.4.0 source tar | ||
- | * Extract into / | + | * Extract into / |
* cd / | * cd / | ||
- | * configure --with-zlib --enable-pcntl | + | * configure --with-zlib --enable-pcntl |
* make | * make | ||
* sudo make install | * sudo make install | ||
- | | + | |
- | This gets a recent copy of PHP installed in /usr/local | + | This gets a recent copy of PHP installed in /usr/local/ |
==== Installing other things ==== | ==== Installing other things ==== | ||
- | Now you need: | + | |
+ | The run-tests.php code is unit tested using PHPUnit. The unit tests can be run individually but the easiest way to run them all is from a build.xml file driven by phing. | ||
+ | |||
+ | Code documentation is generated using Doxygen and unit test code coverage comes from Xdebug. | ||
+ | |||
+ | You don't **need** any of these things if all you want to do is **run** the code. You do need them if you want to make changes and test your changes. | ||
+ | |||
+ | So, in summary, install: | ||
* PHPUnit (which you should be able to install using pear) | * PHPUnit (which you should be able to install using pear) | ||
* Phing (likewise) | * Phing (likewise) | ||
* Doxygen (download, extract, configure, make sudo make install) | * 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 | + | * Xdebug 2.2.0 (download and build). Follow the Xdebug instructions carefully - make sure that your php.ini is pointing |
- | Check that you have all this using php -m. | ||
==== Getting the development version of parallel run-tests.php ==== | ==== Getting the development version of parallel run-tests.php ==== | ||
+ | |||
< | < | ||
git clone http:// | git clone http:// | ||
Line 28: | Line 38: | ||
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. | 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. | The main program is called run-tests.php. The main program is located in the directory /src. | ||
+ | |||
+ | Assuming that you have installed all the tools above, yo may want to run | ||
+ | |||
+ | < | ||
+ | phing doc | ||
+ | </ | ||
+ | |||
+ | first. This will generate class documentation in a sub directory called _docs. It may be useful to look at that in conjunction with the source code and documentation on this wiki. | ||
==== Checking that the code is working ==== | ==== 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. | + | The source code comes with a set of PHPUnit test cases and a QA test suite, all of this is controlled in a 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. | 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. |
qa/runtests/development.1337368804.txt.gz · Last modified: 2017/09/22 13:28 (external edit)