Automated Website Tests, Selenium

php2.gif

Altcom has developed several websites using the Joomla CMS, and they run similar tests for the sites, each time changes are made. Hence it makes sense to develop a method of automating these tests. That is exactly what is offered by the Selenium plugin for Firefox.

Two French students, Alex and Flavien, had already prepared the groundwork when I started, by exploring Selenium and getting some partially-working scripts. The next step for automation was to ensure that the scripts could be run independently of any data which was already on that instance of the website. In other words, the scripts could not assume that there was a category called "News" or "Resources" or "What's On" because the scripts should work on another instance where those categories were not prepared.

With this in mind, we ensured that tests first created sections, then categories in those sections, then items in those categories. In each case we prepared menu links to offer the content on the front page. Then, crucially, we tested the Joomla "publishing" and "access levels" by hiding content (on the admin side) then testing that the content really had been conceaed (on the user side). We repeated a similar pattern for some other core modules such as banners, contacts and web-links.

Automating all these tests with Selenium offers great scope for savings in person-time.

Selenium
Date: 2008

Top of page