Re: Regression Tests

From: Date: Tue, 08 Aug 2000 05:16:17 +0000
Subject: Re: Regression Tests
References: 1  Groups: php.dev php.qa 
Request: Send a blank email to php-dev+get-28067@lists.php.net to get a copy of this message
Hello Thomas, Please don't use HTML to post messages as it makes it hard to read them here. Thank you. As for your message... On 06-Aug-00 10:16:53, you wrote: >I know how regression tests work, but if you run from shell, it will >be<br> >hard to run them on non-unix platforms.&nbsp; OTOH hand, if you run from >a<br> >single PHP script it terminates when a bug leads PHP to crash.&nbsp; You >have to<br> >rely on a PHP only solution to a master PHP script call individual >test<br> >scripts using only the standalone CGI executable.&nbsp; Besides that >there may<br> >exist bugs that only show when PHP is run as a server module, so the >scripts<br> >may have to runnable that way.</blockquote> ><x-signature> ><br> >A possible option lies in using the output buffer and the 'eval' >call.<br> ><br> >A single master script could iterate among a series of test or case >scripts, capturing and comparing output/expected output, examining the >output buffer and any other variables at the end of each test.&nbsp; The >only disadvantage would be testing when output_buffering is >disabled.&nbsp; Regardless,&nbsp; I think this would remove the &quot;is >or isn't a server module&quot; issue.<br> Yes, but as I mentioned this would not work if a bug in PHP crashes your test script. ><br> >I have thought if the script were calling other scripts via a URL through Yes, this may be the best way to prevent the testing master code to influence the test scripts and at the same time avoid being aborted by scripts that make PHP crash. >the web server you can isolate the scripts from interfering with the >master script, unless you hit a really nasty bug which crashes the >server.<br> At least with Apache, there seems to be now way of a test script crash the whole server. The worst that may happen is to crash a server process but you still get a "Document contains no data" response from the server. ><br> >An example would be something like<br> >{pseudocode}<br> ><br> >you have regression_test directory<br> Well, if you want to configure the test from data files you'd better define a XML format to define all parameters. XML is appropriate for that because it is easy to write by humans or programs and easy to parse by a program that will interpret the parameters and execute the tests. Developing a non-XML test definition language would be much more complicated. Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org -- E-mail: mlemos@acm.org URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp --

« previous php.dev (#28067) next »