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.
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 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.
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.