Test for Search.pm

Gavin Shelley bugzilla at chimpychompy.org
Mon Mar 2 09:15:45 UTC 2009


On 1 Mar 2009, at 17:43, Frédéric Buclin wrote:

> Le 28. 02. 09 18:46, Michael Leupold a écrit :
>> I think unit tests would be more appropriate. Looking at  
>> buglist.cgi it should
>> be possible to just create Bugzilla::Search objects and get the  
>> resulting sql
>> for comparison using Bugzilla::Search::getSQL().
>
> From a QA point of view, I don't care about the SQL query returned  
> by Search.pm. I'm much more interested in the list of bugs returned  
> by buglist.cgi. So I'm more interested in improving our existing  
> test_search.t Selenium script, see
>  http://landfill.bugzilla.org/bugzillaqa/show_bug.cgi?id=3103
>
> But you are free to write your own unit test. :)

I once had a work-in-progress test script for Search.pm that tried to  
generate combinations of all the boolean chart fields

There are some combinations that cause MySQL to fail and generate a  
code error when run. (I raised a few bugs about the ones I found at  
the time.)

For that reason, there probably is a case for generating and  
submitting the SQL in the test suite (if only for boolean chart  
combinations).


More information about the developers mailing list