Re: testcase repository
| From: | Kirill Maximov | Date: | Tue, 18 Jul 2000 08:44:22 +0000 |
| Subject: | Re: testcase repository | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-183@lists.php.net to get a copy of this message | ||
hi jalal!
jalal wrote:
>
> Hi
>
> I was thinking about the testing of PHP, automating it and such. Here
> are some ideas and such, all feedback welcome!
>
> I based my ideas on an article in the June 97 issue of Dr Dobbs, by
> Fred Wild. He describes a structure and set of scripts that allow one
> to drop in scripts to be automatically tested. Have a look at it for
> further details.
>
> The directory structure contains, essentially, four main directories,
> bin, input, ideal and actual. (see the article for more details).
>
> First create a script, that optionally takes some input (maybe a file
> to read). Put it into the 'bin' directory. Input file into the 'input'
> directory.
> Create a file that gives the expected output of the script. Put it into
> the 'ideal' directory.
> The script file, input file, ideal file are called by the same name.
>
> Now run the main script, which loops through all the scripts in the
> 'bin' directory and runs them, putting the output of each script into
> the 'actual' directory.
> Then run the compare script, which loops through each file in the
> 'ideal' directory and compares it with the same file in the 'actual'
> directory.
> Any differences are then written to another file.
I'm not sure that simple compare will fit here. I think, that instead
of storing 'ideal' output there should be the separate (?shell?)
script
which takes the resulting output file and analyses it. In fact, it
could be
just diff with 'ideal' template. But it could be some more
sophisticated
analysis too - the separate script could give additional flexibility.
Just my two cents.
Best regards,
KIR
--
---- ----- ----- ----- ----- ----- ----- -----
Kirill Maximov maxkir@email.com
ICQ: 14796643