Wednesday, May 27, 2009

Selenium and firefox-3

http://www.spacevatican.org/2008/9/27/selenium-and-firefox-3
Beta-2 fixes this bug.

Monday, May 4, 2009

Cleanup in Selenium HTML tests

Selenium is a great testing tool. One drawback when writing HTML based tests using selenium is that there is no support for cleaning up after a test. So, if a test fails it may leave things in an inconsistent state which causes problems for subsequents tests in the suite or even for the same test to run repeatedly. One solution is to have a "special clean up test" that runs after each test. I have been thinking of introducing a cleanup section in a selenium test which is demarcated by the word: "cleanup." This requires changes to how HtmlTestCase parses commands in selenium-testrunner.js. When it encounters the special "cleanup" keyword, the rest of the commands are interpreted as being part of the cleanup portion of the test case. Also, modifications need to be made to the HtmlRunnerTestLoop , so that the testComplete function runs the cleanup portion of the test, before running the next test.