This software is called “Selenium” by Huggins, its founder. He joked about a rival project called “Mercury Interactive QuickTest Professional” in one of his emails that, to recover from mercury poisoning, you need to eat selenium.
Today we’re not talking about chemistry, but about Selenium Test Automation Software.
Selenium is a set of open-source software testing automation tools. It supports several programming languages, all operating systems and browsers. Among the customers of the product are Netflix, Google, Fitbit, and others.
Now let’s find out what Selenium is and what features it has.
Contents
Overview
Selenium was originally a JavaScript framework when Jason Huggins wrote it in 2004 so as not to perform manual re-testing. After some time, he renamed it into Selenium Remote Control. The feature that made this tool so special for testers was communication with the browser in the programming language you prefer.
Soon, browser-based security restrictions significantly limited Selenium’s capabilities. One of Google’s engineers, Simon Stewart, developed a product called WebDriver. They collaborated, thereby changing the way software was tested.
Before you start working with Selenium, have a look at this starter pack.
- Download Selenium
- Selenium Documentation
- Selenium User Community on Google Groups
- Selenium GitHub project
- Join Selenium IRC chat channel
Selenium Suite
After merging Selenium Remote Control with WebDriver, this tool quickly became obsolete and is no longer supported. Now the entire Selenium package is represented by 3 main products: Selenium WebDriver, Selenium IDE, and Selenium Grid.
Selenium WebDriver or Selenium 2
This is the main product of the company. The work of this tool involves the interaction of a testing engineer, a browser and the WebDriver. The tester instructs the WebDriver to interact with the elements. WebDriver then gives the browser commands that sound something like this: when the button is pressed, click the button. The browser then provides WebDriver with information about the values and statuses of web elements, which are then sent to the script.
Selenium IDE
This add-on for Firefox is popular among some testers when others hate it. To work with it, you do not need programming skills, since it records your actions in the browser and repeats them. If Selenium WebDriver is too complex for your work, then you can use the Selenium IDE and some additional plugins.
Selenium Grid
This tool allows you to run parallel tests in multiple browsers at the same time. Selenium Grid can significantly save your time.
Advantages
Let’s find out what allows Selenium to overtake competitors year after year.
Free distribution
Selenium is the only free tool on the market that can compete with the paid products. Open source and a low entry threshold for startups and independent developers give the tool a competitive advantage. Even larger companies are in no hurry to switch to paid alternatives.
Suitable for Agile, DevOps, continuous delivery workflows
Selenium testing works perfectly with Agile and DevOps. Flexibility is due to compatibility with a large number of languages, work on all platforms, integration with Jenkins, Maven, TestNG, etc.
Mobile testing
With Selenium, you can test your native, hybrid, or cross-platform mobile applications, although you will need additional software. There are two main options — Appium and Selendroid. They are both based on Selenium, so developers who are already familiar with it can apply the same principles when testing mobile applications.
Support of different languages, platforms, and browsers
Ten supported languages, including Java, Ruby, C #, PHP, JavaScript, Perl, and R, are all the most popular programming languages to date. It is also the only core tool that covers Linux testing.
Community
Selenium testing tools are held in high esteem by both large companies (like Google) and newborn startups. The demand for online Selenium courses on Udemy or Coursera, YouTube walkthroughs, a 25,000-follower Quora topic, and 55,000 StackOverflow questions signal a large, thriving community that brings more Selenium talents to the market.
Lots of plugins
Selenium functionality can be extended with plugins. For example, Appium and Selendroid. Plugins exist not only for WebDriver but also for the Grid and Selenium IDE. There are especially many plugins for the latter; they add functionality and make this product ready to work.
Disadvantages
Now it’s time to look for the flaws of Selenium 2.
Steep learning curve
One of the modern trends in automated testing is testing without code. So a person without special knowledge can start working with tools. A convenient and intuitive interface allows you to switch between modes with and without code.
Selenium does not provide such an opportunity. You need to know at least one programming language to work in Selenium Suite. For example, many startups prefer to hire less qualified specialists as testerы. With Selenium, this will not work. At Cuspy, you can find dedicated engineers working with Selenium.
No technical support
Undoubtedly, Selenium testing is described in a large number of tutorials, Q&As, and chat links, where you can ask the community for help. The downside of this is that help is provided by the same users as you are, not the product’s creators. Because of this, finding a solution to some non-standard problems can be difficult. Interestingly, some companies provide commercial advice on the tool. Selenium provides a shortlist of such companies on its website.
No built-in image comparison
The simplest solution to this problem is a manual check. Otherwise, to do this, you need third-party software. Sikuli is a pretty popular option. This is an image recognition tool that integrates well with Selenium but has limitations: it must work on one virtual or physical screen and does not recognize animations.
No reporting option
Everyone needs reporting: testers, developers, project managers. What is the point of testing if it is impossible to analyze the results?
The lack of auto-generated reports is one of Selenium’s biggest problems. One of the options for solving it is screenshots. Among third-party solutions you can find:
- TestNG, which provides 2 types of reports: detailed and summary. The summary includes simple missing / failed data; while detailed reports contain logs, errors, test groups, etc.
- JUnit uses HTML to generate simple reports in Selenium with indicators of failure and success.
- Allure creates beautiful reports with graphs, a timeline, and categorized test results — all in a convenient toolbar.
Conclusion
Selenium has its drawbacks, but they are inferior to its advantages. If you are a supporter of using code in testing, then you are right here.
Selenium is a universal tool. It is not the best one on the market of test automation tools, especially if you have a budget for them. Nevertheless, its monopoly nature makes you think twice before looking the other way. Perhaps this is not bad.