May 2, 2010

Houston, we have an AMO automation bug found by writing Selenium...

Check this out; confidence-inspiring, no?

stephen-donners-macbook-pro:smokeTests stephendonner$ python API-type.py 
E
======================================================================
ERROR: test_searchapi (__main__.SearchAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "API-type.py", line 65, in tearDown
    self.assertEqual([], self.verificationErrors)
AssertionError: [] != ['type:firebug,dict']

----------------------------------------------------------------------
Ran 1 test in 8.395s

FAILED (errors=1)
stephen-donners-macbook-pro:smokeTests stephendonner$ python API-type.py
.
----------------------------------------------------------------------
Ran 1 test in 6.174s

OK

Sometimes, we return 33 results, and yet at others, we return 0.

Here's what the tests are actually doing:

      try:
            sel.open("/en-US/firefox/api/1.2/search/firebug type:dict")
            retVar = sel.is_element_present("//searchresults[@total_results=\"0\"]")
            if retVar == False:
                raise AssertionError               
        except AssertionError, e:
            self.verificationErrors.append(str(e) +'type:firebug,dict')
        
        try:
             sel.open("/en-US/firefox/api/1.2/search/firebug type:extension")
             if ("Firebug" != sel.get_text("//name")):
                raise AssertionError
        except AssertionError, e:
            self.verificationErrors.append(str(e) +'type:firebug,extension')

automation++

I'll be filing a bug shortly.

Posted by stephend at May 2, 2010 8:02 PM
Comments
Post a comment