Selenium–Why We Love It So Much (part 1)
Selenium is truly amazing, and there’s a video in this article proving that. Join us to learn about how you can save time and money (and make your testers happier!) on your next project.
Automation testing beats manual testing many times, as it saves a lot of time, provides a high level of accuracy, and requires less human force. Selenium–an open source tool for testing web applications–stands out as one of the most popular and efficient test automation tools at present. In this article, we explain why we find Selenium truly amazing.
Selenium automates browsers. That's it! What you do with that power is entirely up to you.
Automated testing vs manual testing
Before going straight to Selenium, let us briefly get back to the two types of software testing–manual testing and automated testing. Manual testing rests on human labor force–QA testers manually perform software testing all day long with different data sets and success/failure rates. Poor chaps have to record and manually verify every transaction; hence, they are prone to fatigue and, obviously, errors.
As Nikita from Yellow recalls, being a QA tester was not much fun in the early days of his career: "It was a standard, routine manual testing: same cases and scenarios day after day…"
However, once Nikita’s boring experience as a manual tester ended: "Everything changed when one day I discovered an instrument that allows recording actions and running them numerous times. With the help of Selenium, I could do tests mostly automatically, what, obviously, made me more productive."
To cut a long story short, Selenium was founded as an automation testing tool to overcome the limitations of manual testing and make a tester’s job a lot simpler. Indeed, automation testing completely wins over manual testing. Why?
Automated testing is much faster and demands less human efforts (companies might save their budgets on QA’s salaries). Moreover, automated testing reduces errors and allows frequent tests’ execution. In addition, it can be simultaneously performed in different environments and web-browsers. You might even schedule the result file for a particular time during the day.
Selenium: How it all started
In a way, the creation of Selenium resembles a typical motivational movie. Imagine the early 2000s, when the test automation market was quite underdeveloped. A company called Mercury Interactive dominated the market with its test automation tool Astra Quick Test. The tool was far from perfect, as it could only run tests on Windows and supported a small number of browsers.
Apparently, not everyone was happy with Astra Quick Test, including a software engineer from California named Jason Huggins. When Huggins built a new advanced test automation tool, he named it Selenium in a reference to the chemical element recommended as an antidote to mercury.
Selenium Suite and its features
At present, Selenium consists of a package (or a suite) of tools. Selenium Suite consists of several components: Selenium WebDriver, Selenium IDE, Selenium Grid, and Selenium Remote Control (RC). In 2008, Selenium WebDriver and RC were merged into Selenium-2, so in case you see the name Selenium-1, it only refers to Selenium RC.
Mostly, when people speak about Selenium, they mean Selenium WebDriver–the most important product from the Suite. Indeed, Selenium WebDriver was the first cross-browser and cross-platform testing framework. With the help of WebDriver testers are able to control web interactions on a browser from the OS level as well as write scripts in various languages (Java, Perl, Python, C#, and others).
In a way, Selenium WebDriver works as a taxi driver. When a customer gives instructions to a taxi driver, a taxi driver, in their turn, gives certain commands to the car. Analogically, when a tester commands WebDriver to interact with certain web elements, the WebDriver gives appropriate commands to the browser. The browser subsequently provides WebDriver with information about the values and statuses of the web elements, and this data later turns into a script.
However, Selenium’s WebDriver also has its dark side. Have you ever encountered troubles when booking extremely cheap flights online? Perhaps, someone has quickly taken all the tickets by automating bookings with the help of WebDriver…
All you need to start with Selenium IDE is to install the extension on your browser. Extremely easy to operate, Selenium IDE records users’ actions in the browser and later repeats them. It is a simple solution for quick reliable end-to-end tests. Certain companies might use Selenium IDE as a simpler alternative to Selenium WebDriver. Also, Selenium IDE can be extended with the help of different plugins.
Selenium Grid is an extremely timesaving tool, which allows running parallel tests on multiple browsers and machines at the same time. Let’s say, you have to run 1000 tests. What will you do? Set up 10, 20, 100+ virtual or physical machines with the help of Selenium Grid, and save up to 100 % of your time compared to what it would take you running just a single machine.
Parallel testing is another Grid’s helpful feature. Taken into account that scripts might run quite slow on certain browsers, you might launch your test in parallel in Chrome, in Firefox, in Opera… Moreover, with Grid, you can combine different browsers and operating systems!
In conclusion of part 1, Selenium has revolutionized the testing world and spared QA testers from doing a boring manual testing job. Today Selenium appears on the software market as a suite of different products: WebDriver, IDE, and Grid. Among them, WebDriver is the most important product from the Suite, while Selenium IDE as a simpler alternative to Selenium WebDriver. Selenium Grid serves for running parallel tests on multiple browsers and machines at the same time.
Get weekly updates on the newest design stories, case studies and tips right in your mailbox.
Here at Yellow, our team is truly happy to receive such positive feedback!
Technical debt is natural in software development. It’s not inevitable in every software, from large B2B platforms to simple mobile games, but when it occurs we still need to pay it off so the final version will work smoothly. How do you do it? With the help of refactoring.
There is no doubt that working with video content is always fun. Still, it’s also difficult to argue that working with such content doesn’t require a lot of carefulness and attention to detail. More so when we talk about something that requires extreme accuracy like catching and following elements in a video. But nothing is impossible.