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

| No Comments

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.

Leave a comment

About this Entry

This page contains a single entry by Stephen Donner published on May 2, 2010 8:02 PM.

Conversion process from Selenium IDE to Python (and its pitfalls/gotchas) was the previous entry in this blog.

Being manipulative as a software tester: how to try negative-testing web apps through their URLs is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 5.12