New feature: SofySense – Manual test case & test results AI generator to help you speed up your testing process. Try it today.  

Sofy launches product feature suite to deliver effortless test maintenance and ensure continuous precision – learn more.

sofy logo
Sofy x Alex Leo, Shutterstock

Is Selenium Losing Steam?: Consider the Pros and Cons

Selenium is a popular tool. Yet while it has has its benefits, Selenium also comes with a variety of challenges. Let's take a look.

With Selenium, it’s complicated. One of the challenges of testing applications is that the capability of tools to test will always lag behind the rapidly evolving features of the application itself. This is especially true with web application testing. Despite the vast libraries of open-source solutions, the testing frameworks seem to be a step behind.

Is Selenium the rule or the exception? Can Selenium support the level of testing needed for modern web applications? Let’s take a look.

What is Selenium?

Selenium is an open-source testing framework used to validate web applications across multiple platforms, browsers, and devices. With the ability to generate no-code test cases through record/playback testing, or code-based tests written in Java, C#, Python, or Ruby, Selenium is as flexible as it is feature-rich. The Selenium suite, currently Selenium 4, includes Selenium IDE, Selenium Grid, and WebDriver:

Selenium IDE

Selenium IDE is a no-code browser-based extension used to record and playback user actions. It can be used to develop automated test scripts and even convert them into different programming languages to develop them further.

Selenium Grid

Selenium Grid allows testers to run parallel test scripts across multiple machines (nodes) and browsers, decreasing the overall test execution time. Develop your test using WebDriver and schedule them here.

WebDriver

WebDriver lets developers write test cases in the language of their choice. Developers can communicate directly with the browser instead of relying on JavaScript as was previously the case with Selenium Remote Controller.

Growing popularity

Selenium has been around since 2004. With over 600 contributors on GitHub, it’s clear that a lot has been put into the platform. It features a wide range of capabilities for almost any web testing business case.

One thing is undeniable: Selenium is the most popular web application testing tool. In the past few years, there has been an exponential growth in job postings related to Selenium skill sets, with no sign of slowing down.

While that may be good for job seekers, is it good for businesses? Does this signal an increase in companies using Selenium or an increase in the headcount needed to support it?

Advantages 

 Selenium brings a number of advantages to the table:

Extensive open source library

Over the years, Selenium has seen over 600 contributors and a vast range of enhancements. New features, fixes, and functionality are added often. It’s free to use and can be set up within a few hours.

Supports multiple languages

Using WebDriver, developers can write in the language they’re comfortable with. This makes Selenium skill sets more accessible. Write test cases in Java, C#, Python, JavaScript, and Ruby.

Offers code and no code testing solutions

Selenium IDE supports record/playback and generates test code in the language of your choice. It’s recommended that selenium IDE is used for prototyping, while the complete test can be finished with WebDriver.

Multi-browser, multi-device

Selenium supports almost all browsers and operating systems, so testers can write and run their test scripts with similar results. It also supports Parallel test execution with Selenium Grid. Run multiple tests in parallel to save test execution time.

Challenges

However, it’s not all roses with Selenium. Consider the following disadvantages to using the platform:

Scalability

As your application functionality grows and evolves, so must your tests. Simple configurations and updates to your web application could break the test. The larger the scope and scale of the application, so must your testing efforts grow. Consistently creating, managing, and updating test cases could prove challenging.

Mobile testing

Selenium tests in multiple browsers, including Edge, Chrome, Firefox, and Safari, and on multiple Operating Systems but it’s limited for mobile testing. For this, open-source developers typically turn to its friend Appium.

Reporting capabilities

Many users want more reporting capabilities. While Selenium provides logs on test results, it doesn’t provide the fine-grained reporting capabilities that other testing platforms offer. The workaround is using TestNG to handle complex testing requirements.

Flakiness

There are several complaints from developers that have to come up with hacks, workarounds, and complex logic to handle dynamic content. Since Selenium looks for the appearance of static objects, single-page applications using ReactJS or angular are unpredictable, making testing challenging.

Unsupported Components

Support for certain components, like windows based pop-ups, are limited. These are common with authentication flows when using a Microsoft device. Captcha also isn’t supported, given its prevalence in web applications, this can be a challenge for testers. In addition, certain dynamic, client-specific components are hard to test without explicit waits or workarounds.

Learning curve

Selenium certainly has easy-to-use features, but understanding the tool holistically is going to take time. Although it offers codeless test case automation with their IDE, cohesive test cases will need to be written in a programming interface only. This makes it more challenging to staff, train, and maintain the skill sets needed to write tests, which is not the case with no-code testing solutions like Sofy that are out there.

Modern testing frameworks 

There’s been a surge of modern no-code testing frameworks that address some of the issues found with Selenium. These testing tools use AI, Machine Learning, and Natural Language Processing to help users write cases and help keep them from breaking.

Instead of relying on the object or element itself, these tools can consider the context of your action so they’re able to adjust test cases when code changes to avoid false positives. Since these platforms are no-code, the learning curve is less steep, which means testers and developers can integrate closely together. 

The case against open-source

Free is great. We all can agree. But there is something to be said about having a support team and SLAs that come with paid tools. You’ll also find these tools are incentivized to be on the ‘cutting edge.’ Some other benefits include:

  • Scalability: Tools like Sofy can be run as soon as code changes occur, so you can be made aware of the instant regression fails. It will also provide a root-cause analysis and can predict the issue with 98% accuracy.
  • Real Device Testing: Record a test on an actual device or an emulator and convert it to automation.
  • Supports mobile: Modern testing frameworks support mobile device testing, making your tests smarter for real-world use.
  • Collection of tools you need: You don’t have to sift through open-source libraries to find what you need. With modern testing platforms, everything you need is already there.
  • Behavioral Learning: Do you know how your users are actually interacting with your application? Tools like Sofy can observe common user workflows and build test cases around them.

Selenium is here to stay, but that doesn’t mean that it’s right for every business. Take inventory of your testing needs, your existing skill set, and your technology stack. Can you support what you need with an open-source tool? Or is your team better suited for a no-code testing platform?

Disclaimer: The views and opinions expressed above are those of the contributor and do not necessarily represent or reflect the official beliefs or positions of Sofy.