Re: testcase repository

From: Date: Mon, 17 Jul 2000 15:07:30 +0000
Subject: Re: testcase repository
Groups: php.qa 
Request: Send a blank email to php-qa+get-170@lists.php.net to get a copy of this message
1. What sort of script to run? At the moment I have been testing by running the php.exe under Windows and passing it the file name. Seems to work fine, but it may not be ideal. What I may do is create a small test harness, that does an HTTP GET to the webserver, passing it the script and then collection the returned page, something like that. Then we are actually testing the server setup.
Well, under unix you can use lynx -dump to achieve a more accurate result. Part of the problem we face is that there are a *lot* of functions that need to be tested, not to mention that to really test you'll want to stress them.
2. This idea works well for the 'built in' parts of PHP (i.e. testing 'foreach' statement, or reading files etc) but is not practical for testing the modules, as it will need the correct module installation, and MySQL installation on any testing computer. Not an insurmountable problem, but needs thinking about.
Is there (or can there be) a function to detect whether or not a given module is installed, something along the lines of module_exists(mysql) or similar - that way you could conceivable test most of the modules if they are present.
3. There are two different sorts of things to test, one is the standard behaviour of the system (i.e. sorting the same array should always give the same result) and also scripts created to resolve bugs. Whether they should be in the same system or not....
I think you're on the right track, I would suggest maybe writing scripts for each 'section', maybe divide it up in the same organizational structure as the PHP manual. What do you think? Shawn -- --- Shawn J. Wallace (shawn@justweb.com) Justweb Inc. -- Professional Internet Services phone (519)652-6599 fax (519)652-9915

« previous php.qa (#170) next »