4th Annual Selenium Conference 2014

By– Rajnikant Jha

The 4th annual meeting of the Selenium Conference was held for the first time in India (Bangalore)September – 6, 2014. With 400 attendees from across the globe, around 20 speakers and the Selenium Committee members,this event delivered tremendous expertise and information. I would highly recommend this to anyone who is working in Selenium or related technologies.

Selenium is most popular software testing framework for web applications today. The increasing trend of Selenium users shows the popularity of Selenium. Job trend in Industry shows rise in job related to Selenium automation in last 3-4 years. Graph below shows Job trend compared to QTP as percentage of related jobs.

Starting with the Welcome Address given by Simon Stewart, the creator of the WebDriver open source web application testing tool and a core Selenium 2 developer, this conference was rich in information, valuable tips and smart people who had multiple years of experience in Selenium. The event’s Lightening Talks track gave the attendees an opportunity to discuss issues and questions with each other as well as the Selenium Committee members. Some of the key items worth noting are as follows:

  • Selenium 3.0 which was to be released last year in Dec 2013 will be released in a couple of months.
  • With the Selenium 3.0 launch, Selenium RC has been officially deprecated, so the companies using RC should switch to WebDriver.
  • Selenium 4.0 is also on schedule and will probably be released by year-end. It will standardize to W3Ctoo.
  • Selenium IDE is being superseded by Selenium Builder.
  • Selenium Grid will have a video recording functionality enhancement.

My questions mainly related to the stability of WebDriver will be addressed in the next releases of Selenium.

I also received good response to some of the work-arounds that we are doing at ThinkSys to improve script stability and to handle some browser quirks. For example:

  • Moving mouse to origin before the test script starts.
  • IE browser setting to run automation
  • Using Firefox profile with Selenium
  • Handling Chrome Crashes

There was so much good information at the conference that will help the community to design, maintain and execute test scripts using Selenium. Some of my favorite talks and presentations included:

1)      Perils of Page Object Pattern – by Anand Bagmar

A Page Object Pattern models pages within the test code which reduces duplicity in code and provides better maintainability with one place change. Most of the WebDriver scripts and frameworks use Page Object Pattern. The talk explained Page Object Pattern through the example of Amazon application and code samples. From the discussion and code samples we understood following limitations of Page Object Pattern:

  • Test intent gets polluted
  • Duplication of implementation
  • Maintenance challenges
  • Scaling challenges

Does that mean we should not use Page Object Pattern? We should always use this for the benefits it has but it should be created for the business layer of application. The ideal Test Automation pyramid should have two different types of test automation – one for technology tests which include unit tests and integration tests, and another for business tests which include UI, functional and regression tests. This pyramid helps to understand the test intent in business terminology. The test intent is most important in Page Object Pattern.

Business Layer Page Object Pattern with test intent of business layer automation helps to design correct pattern and it has following advantages:

  • Effective automation scripts for business requirements
  • Abstraction layer allows separation of concerns
  • Maintenance and scaling becomes easier

2)      Scaling and Managing Selenium Grid– by Dima Kovalenko

There are three main topics:

  • Stability
  • Speed
  • Coverage

The presentation talked about all three topics and covered the main concerns that Selenium users face when using Selenium Grid. The presentation offered a number of suggestions that can be used to stabilize execution using Hub and nodes. The key points regarding stability were:

  • Move as much to Linux as possible
  • Run one test case at a time
  • Use better mechanisms like Crons for OS and Nodes configs
  • Use WebDriver instead of RC
  • Create schedule tasks to periodically restart Grid node and computer
  • Use batch file for IE which clean up cookies and cache and launches Internet Explorer

For speed optimization, use of smaller nodes with single browsers is recommended. For cost effectiveness, the use of low-end machines should be considered.

For testing coverage purposes, we may have to use browsers like IE7 and IE8, but these browsers take more maintenance time. Browsers like IE9 and beyond are more stable and recommendable. If we have to use Safari, it is better to use one Safari browser per machine. There are some other features that we may consider for stability of execution on nodes:

  • Automatically Set IE Protected Security Zone each reboot
  • Kill web browsers after test
  • Automatically update drivers and jars

Overall, I found the conference educational and motivating. It was great to be surrounded by other technical people in my industry all sharing their knowledge about this technology. I hope to be there at the next conference and encourage others in the Selenium space to join me!

Leave a Reply

Your email address will not be published. Required fields are marked *