Selenium is one of a few tools that provide automated regression testing.  You can record a script of clicks and form entries in a web browser and export to a language of your choice – unless you have a guaranteed future team of PHP wizards, export to Java so your project team can maintain it.

If you write Selenium tests for your vertical slices [test.vertical], they should be less fragile so they still succeed when the data changes.  

  

Our technology website combined a number of different RSS feeds and used them to render pages of article teasers.  Since the website was very large, every now and again bugs would creep in.  Regression testing took many days with each release.  

We asked Tony to write us some Selenium scripts to automate this task; a last-minute sanity check before we sent it to a customer.

For the first release, the Selenium scripts completed successfully.  But two weeks later they failed because the “Android releases Froyo” article was no longer on the homepage.  The script had been written without the ability to adapt to data changes.

A more robust script would have queried the first article from the page and then tested that it could be successfully viewed.

Sometimes a less fragile script means a compromise to test a little less than you would like to.  Provided the HTML markup uses appropriate naming conventions for sections of the screen, Selenium scripts need not be a large maintenance burden for the team.  

blog comments powered by Disqus