Re: [PHP-DEV] Regression Tests From: Manuel Lemos (mlemos <email protected>)
Date: 08/08/00

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: email protected>?subject=Re:%20[PHP-DEV]%20Regression%20Tests&replyto=2707.255T884T1364085mlemos <email protected>">mlemos <email protected>">http://phpclasses.UpperDesign.com/?user=mlemos <email protected>

--
E-mail: mlemos <email protected>
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>