Re: Getting started with writing tests

From: Date: Wed, 16 Apr 2008 07:16:55 +0000
Subject: Re: Getting started with writing tests
References: 1  Groups: php.qa 
Request: Send a blank email to php-qa+get-64200@lists.php.net to get a copy of this message
Hi Tom
I'm interested in participating in test fest and just have some questions. Great! This is the right place to ask.
I've read through the docs at qa.php.net (although, please point me to the right place if I've missed it) but it is unclear to me how to: * run and re-run tests * run just my tests I have a small shell script (but you could equally well use a bat file). Here is is:
#!/bin/sh export TEST_PHP_EXECUTABLE=/home/zoe/BUILDS/$1_dev/sapi/cli/php $TEST_PHP_EXECUTABLE /home/zoe/BUILDS/$1_dev/run-tests.php $2 I keep this in a file called 'run' in my ~/bin directory. All I type when I want to run a test is: run php53 mytest.phpt The first argument points to the PHP build that I'm using, the second is the name of the test file. I find this the most convenient thing to do most of the time. The other thing that you should look at are the command line options for run-tests.php. You can, for example, run all the tests in a directory.
Zoe


« previous php.qa (#64200) next »