Selenium Testing Tool – An Outline

Selenium Testing

Selenium is a suite of tools to automate web browsers across many platforms. It is an open source framework that can run in many browsers and operating systems. Selenium is the core technology in a number of browser automation tools, APIs and frameworks.

Selenium testing has become a popular choice in the current software automation testing market. According to a survey conducted on the breakdown of QA automation tools for organizations with 100+ employees, 80% of the organizations use open source tools, among which 29% use Selenium.

Selenium Testing

Source: TestProject

Further, the survey also depicted a deep analysis of the open source tools used by companies with an employee strength of 1-100 people. Selenium was again the winner.

Selenium Testing

Source: TestProject

Selenium testing requires code implementation of the test scenarios and supports most of the scripts like C#, PHP, Python, Ruby, Java, and Groovy. It comes in following flavors:

Selenium WebDriver — Selenium 1.0 and WebDriver together constitute Selenium 2 or Selenium WebDriver, which overcomes many of the limitations of Selenium 1.0. It is a collection of open source APIs and helps create robust, browser-based automation suites and tests for an application. WebDriver supports many browsers and operating systems like Chrome, Firefox, Opera, Safari and IE, and Android (with Selendroid or Appium) and iOS (with ios-driver or appium). Now Selenium 3 has been released. It has bug fixes from Selenium 2 and is more mobile automation focused. And if you are already using WebDriver APIs, then Selenium 3 is a straightforward drop-in upgrade.

Selenium RC — It is a server written in Java that accepts commands for the browser via HTTP. RC allowed writing automated UI tests for a web app in almost any programming language. With the release of Selenium 2, Selenium RC was officially deprecated in favor of Selenium WebDriver.

Selenium Grid — It allows running tests on different machines against different browsers and operating systems in parallel. If you are using Selenium Grid, Selenium 3 update means you can just drop in the new JAR (or update your maven dependency to 3.x). With Selenium Grid, while you can use the same testing code, you need to use RemoteDriver instead of the browser specific drivers like FirefoxDriver or ChromeDriver.

Selenium IDE (Integrated Development Environment) — It is used as a Firefox extension that allows you to record, edit and debug tests. It helps to create quick bug reproduction scripts and is primarily used as a prototyping tool. Familiarity with JavaScript, HTML, and DOM (Document Object Model) can prove beneficial in exploiting the real potential of this tool. Besides, from Firefox 55 onwards, Selenium IDE will no longer work.

Pros and Cons

Let us observe some pros and cons of using Selenium testing framework.

Advantages of using Selenium testing framework:

  • Selenium is a free open-source tool.
  • Selenium supports integration with a number of other open source frameworks like TestNG, JUnit, NUnit and more.
  • It has a large and active development and user community to keep pace with software technologies.
  • It allows tests to run simultaneously on different browsers, and on different machines.
  • Selenium is highly flexible and allows you to add functionality to both Selenium scripts and Selenium framework to customize test automation.
  • Selenium supports a wide range of languages, operating systems, and browsers.
  • Selenium uses fewer hardware resources in comparison to a number of other popular tools.

Selenium has no doubt made web testing a lot easier, yet it has its own set of challenges:

  • To set up and integrate Selenium with other tools and frameworks, testing teams need adequate programming skills and experience.
  • There is no inbuilt report feature, hence third party tools or plugins are required for the purpose.
  • Maintenance is troublesome and demands adapting your Selenium code for each change in the application. It may turn out to be a cumbersome process in the end and the main reason for project failure.
  • Selenium IDE lacks significant functionality and browser support.
  • Selenium doesn’t offer much in terms of UI test automation.
  • Selenium test suites take a long time to run. They may not essentially be too slow, but it demands quite a bit of skill and expertise to keep them running.

Despite the challenges, Selenium testing is gaining popularity and is going to be the most sought-after tool in 2017. It is a powerful tool that can be leveraged effectively by testers and developers. The Magic Quadrant for Software Test Automation report by Gartner states that by 2020, 50% of companies will use open-source tools for software testing due to growing DevOps segment.The report also suggests that by 2020, Selenium WebDriver will become a standard tool for functional test automation.

Hence, the overall adoption rate is rising, and organizations need to get comfortable with the use of Selenium to remain competitive. It is a good time to take a step further and evaluate migration risks and challenges, and take crucial steps to accept and adapt the automation framework in Software Quality Assurance domain.

2 comments to "Selenium Testing Tool – An Outline"

  1. I’d like address the challenges noted above.
    1. Adequate skills and experience – yes it does require at least a basic level of understanding in your chose programming language, but that is going to be the case for any test automation tool beyond the rudimentary “record and playback” tools.
    2. Lack of reporting – I agree that this is one area that Selenium WebDriver falls short. I made up for it by using log4j, which does a nice job of it.
    3. Script maintenance – This is not just a Selenium issue, any test automation tool that you use will have these same issues if the application under test is continually changing.
    4. Lack of features – Selenium IDE is really only useful (at least to me) for prototyping my scripts, so I can map out what my real scripts need to do. It’s lack of functionality isn’t really a hindrance when used that way.
    5. Selenium WebDriver isn’t built to do thick-client application testing, it’s designed to automate testing of web pages. Period. If you need to do test automation of installed client apps, then you should be looking at a tool such as QTP which was built for that purpose.
    6. Script slowness – True, they can be slow but it’s still faster and in many cases more accurate than a typical tester can run the same tests, especially after a marathon testing session when a human tester is tired and maybe not paying as much attention as they should be.

    1. Hi Rick, thanks for the constructive feedback. I agree with your viewpoint, and yes, it’s definitely helpful to understand the way you use Selenium. My views on the same are as follows:

      1. Need adequate skills and experience — True, any test automation tool will need basic programming know-how, but then, with QTP /UFT, we can create test scripts far more easily using VBScript and other tool features. With Selenium, however, complex scenarios cannot be easily handled without a good grasp of the coding language.

      Moreover, we simply need to download QTP/UFT, and install these tools, which come with required components already integrated by the vendor. However, with Selenium, we need to manually configure the tools and plug-ins supporting automation, thus requiring better skills and experience.

      2. Selenium WebDriver isn’t built to do thick-client application testing, it’s designed to automate testing of web pages.

      True, but when testing dynamic web apps, timing issues need to be handled, and in Selenium, one needs to manually implement a wait mechanism in code. Besides, there is no built-in-data driven testing, which means manually connecting automated tests to external data sources, making the process slow. Dealing with pop-up windows, testing flash apps, and identifying dynamic objects are some other challenges with Selenium test automation.

      Moreover, Selenium does not have any tool in its tool suite to support test management.

      Even with all the above, I completely agree that most of the challenges can be well addressed using third-party tools and plug-ins, hence, the tool is here to stay for long. Besides, being an open source free to use tool, Selenium offers significant cost advantages and is a competitive browser automation tool.

Leave a Comment

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