Automating Browser Testing With Selenium

As Zirous’ summer interns, we were given the task of creating an automated testing application for an extensive web application for an existing client. Our main goal was to create a tool that would reduce the amount of time developers spent testing. With our varying degrees of knowledge coming into the summer, we knew we had to get right to work. We were given an introduction to the client website and to the testing tool we’d be using, Selenium.

Selenium is an automated browser testing plugin that is native to Firefox web browser. From simple sign-on’s and sign-off’s, to intricate browser navigation, Selenium is a tool that can be used to ensure fluid browser navigation. Our original plan was to use Selenium to record actions, such as typing and clicking, on the web page and then replay the actions as a test. Once the webpages are recorded and made into tests, the tests would be uploaded to Hudson, a continuous integration system, for the tests to run at set times. If the test were to fail, Hudson would create a report of where the test failed.

This project had many hurdles and hiccups. The biggest challenge being the compatibility of Firefox and Internet Explorer 8. The client website runs only on IE8 and Selenium runs on Firefox. Each page gave us a new problem to solve and with each page, we learned something new. When we had completed the Selenium tests and tried to upload them into Hudson, we discovered that there were still compatibility issues with the Selenium plugin and Internet Explorer. The best option, we found, was to convert the Selenium tests into jUnit  tests which allowed the tests to be more dynamic.

The main takeaway from our project was the creation of a tool that reduces the testing time for developers. This testing application will allow all parts of any web application, some parts that may not normally get looked at, to be thoroughly tested. Hudson can deploy the tests automatically in the background so that the developers can focus on what they do best; developing. This testing application ultimately gives the client the best possible solution.

Although our use of Selenium was focused on one project, it has the capability to be used in countless implementations. Extensive web based applications are the perfect candidates for this tool. Repetitive and simple processes are simple to test, allowing more time to focus on complicated processes. The tool also has a very wide set of languages and web drivers for almost any browser. But, like most implementations, it takes time, effort, and critical thinking to be successful.

Interested in an internship with us? Head over to our Careers page to find out how to apply!