Test for Search.pm

Aaron Evans ahdevans at gmail.com
Sat Feb 28 17:05:43 UTC 2009


I've got some time and would like to help with this.  Do we want selenium
tests or unit tests?

On Sat, Feb 28, 2009 at 4:04 AM, Michael Leupold <lemma at confuego.org> wrote:

> Hi,
>
> with all the changes I recently did to Search.pm I figure it is pretty hard
> to
> find out if it's still behaving as it did before. As I didn't find any
> automated test I wanted to ask if you think that's something worth putting
> some effort into and if you have some ideas on how to construct such a
> test.
>
> Basic idea so far:
> - Construct an array of input searches and output SQL.
> - If run, compare the SQL query Search.pm produced for each of the input
> queries with the stored output SQL in the array.
> - If the SQL doesn't match, output so the developer can compare and check
> if
> searches are equivalent - if they are, replace the static query with the
> newly
> created SQL query before committing to make the test work
>
> Problems with that:
> - The SQL produced by Search.pm depends on the database type used
> - AFAIK Search.pm needs a running database server (so it might not qualify
> for
> automatic testing in runtests.pl)
>
> Of course you'd have to decide which queries to put into the test to cover
> as
> much functionality as possible
>
> Regards,
> Michael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bugzilla.org/pipermail/developers/attachments/20090228/aeb6a85c/attachment.html>


More information about the developers mailing list