What is browser compatibility for software? In different browsers the same text, graphics and color can appear differently. Some of the browsers do not support Javascript or Active-X control which are required by the software to provide the desired functionality to the end-user. The critical areas of the software is expected to appear and function as desired on all the commonly used browsers like safari, IE, firefox etc. This ensures that the code developed supports browser compatibility, one of the crucial aspects of software development.

Examples of browser compatibility issues:
1. The date input field is validated for incorrect date-formats using javascript. If javascript is not supported by the browser, the software will allow the customer to enter invalid date which is a defect

2. A country drop-down is sorted alphabetically using a client-side javascript. The same rule applies as one. If it is not supported, the user finds it very difficult to select a country from the dropdown

3. Misalignment of controls on the web page which looks frustrating to the customer

4. Web page looking cluttered on mobile browsers

Having elaborated on browser compatibility, let us discuss a very popular tool called selenium grid that provides a very easy way to execute multiple tests in parallel on different browsers. By running the test suite concurrently on several browsers it reduces the cost for browser compatibility testing and also dramatically speeds up the feedback cycle. This article is a great head-start on how selenium grid makes browser compatibility testing fun and easy. It explores the boundless potential it offers when used in conjunction with Selenium RC. In the next article “Six steps to complete test automation with selenium grid” we will get our hands dirty with selenium grid programming and execution.

Architecture of Selenium Grid:

Here we can see three main components in the diagram, Test, Selenium Hub and Selenium Remote Control.

The Test is a series of Selenium commands

The Selenium hub routes the selenese requests from the Test to the appropriate Selenium Remote Control.

The Selenium Remote Control is an instance of Selenium Server that registers itself to the hub when it starts describing the environment provided…….for example chrome on ubuntu, IE on windows.

Selenium grid is a distributed grid of Selenium Remote Controls. The Remote Control is an instance of Selenium Server that registers itself to the hub when it starts describing the environment provided. When the Selenium Remote Control is started we define which environment it provides to the hub. In the selenium test, when instantiating the Selenium driver, the hub environment is passed in the place of the browser string.

The Remote Control instances that have been registered with the grid show up in http://localhost:4444/console. The Selenium hub routes the selenese requests to the appropriate Selenium Remote Control. The hub puts the request on hold if there is no available Remote Control on the grid. As soon as the suitable Remote Control becomes available the hub will serve the request. The hub parses the tests that target specific environments. We can specifically target a particular browser and a particular platform for testing the software.

This is how Selenium grid works and it makes browser compatibility testing a breeze.

Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks