Saturday, 4 April 2009

Automating testing of web sites with multiple browsers

After several days of trying, I've just abandoned an attempt to automate web site tests with multiple browsers (Firefox, Internet Explorer, Safari and Opera under various operating systems). My findings are written up here. Briefly, I think that Selenium RC has the right architecture, but currently the linkage between the RC server and the browser only works 100% for Firefox. This isn't enough.

It seems from the documentation that Watir should support the functionality needed. Can anyone confirm that it's possible to test pages such as this one in at least three different browser types with it?

Update (9 April): I discovered that Selenium RC has a start-up parameter "-proxyInjectionMode", which is equivalent to choosing the "*pi..." launchers where available. Unfortunately this only works with "*firefox", so you might just as well use "*pifirefox". It isn't clear to me why it causes tests to fail when they launch a browser with "*mock".

I was also reminded at the SPA2009 conference that it might be worth trying out Cucumber, rSpec, Concordion or other tools, so long as they will drive more than one browser.

No comments: