DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Testing Strategies for Web Development Code Generated by LLMs
  • Testing Is Not About Finding Bugs
  • Frame Buffer Hashing for Visual Regression on Embedded Devices
  • How to Interpret the Number of Spring ApplicationContexts in Integration Tests

Trending

  • The Trust Problem in Modern SaaS: Why Your Authentication Succeeded, and You Still Got Breached
  • On-Device Debugging and JUnit 5
  • From "Vibe Coding" to Production: Setting Up an Evals Loop for Claude Agents
  • Give Your AI Assistant Long-Term Memory With perag
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Testing, Tools, and Frameworks
  4. Selenium Grid Performance Problems

Selenium Grid Performance Problems

The current Grid project is not designed properly for heavy load and does not have a stateful structure. So if the hub crashes, everything starts over. What to do?

By 
Melih Sakarya user avatar
Melih Sakarya
·
Feb. 06, 21 · Analysis
Likes (9)
Comment
Save
Tweet
Share
9.9K Views

Join the DZone community and get the full member experience.

Join For Free

You can run your Selenium-based test automation scripts on the browser you want and distribute it with the Selenium Grid project. This is actually a very simple and easy solution.

According to the architecture, thanks to the Selenium grid project, you raise a hub and register different machines to this hub as a node. In this way, the hub directs you according to which browser or operating system you will run. If that node is used by a different test, it will queue you up and continue running the next test when it is finished.

I can hear what the experienced test engineers are saying. That job won’t be that easy. In teams with more than 100 test scenarios, Node management on the Grid project is unfortunately not as capable as it seems.

I have listed the main problems encountered as follows:

  • Faulty tests hanging on nodes. 
  • If too many nodes are connected to a hub, experiencing interruptions. 
  • If there are too many tests in the queue, it will timeout after a while or cannot be forwarded to the nodes. Severe slowness with too many test runs.

What I see most fundamentally is that the current Grid project is not designed properly for heavy load. Besides, it does not have a stateful structure. So if the hub crashes, everything starts over.

Several projects were developed that solved this. One of the most popular is the Zalenium project developed by Zalando, but the main problem here is that the distributed structure has limits. In addition, if it experiences similar problems in real instances due to its Docker-based operation, the access will be completely lost again.

One of the alternatives you can use for Selenium Grid management is Testinium. Although Testinium is a cloud-based product, you can use private cloud and on-premise versions. One of its most beautiful features is that it manages the queue structure on itself instead of Selenium Grid. Due to the Selenium Grid structure, it constantly checks for all tests waiting in the test queue and becomes unresponsive after a while.

Testinium, on the other hand, directs the tests that can only run on the Selenium Grid according to the number of parallel runs you specified, and loads only the test run load to the Grid. Thanks to its internal reservation structure, requests waiting for busy nodes are kept in the queue.

There are test limits that you can put in the test queue for products that provide the Selenium Grid service as SaaS. When you send tests triggered by a CI tool like Jenkins to a product without queue management, your tests that exceed the limit will be rejected. Testinium does not set a limit for the tests you can send to the queue. You can send your 10,000 scenarios to the test queue and run these tests on nearly 500 nodes.

In addition, there are mechanisms that perform timeout management and healthcheck controls on nodes. This way, even if a node is broken, if there is no test on it, it can be reconnected.

For example, with a bank we work with, we can run and complete nearly 200 nodes and more than 10,000 tests with this system.

Different features in Testinium are as follows:

  • Queue management 
  • Real mobile device management and management against device disconnections 
  • Wipe feature to delete private information on mobile devices 
  • Ability to take screenshots automatically 
  • Video runs of all tests 
  • Docker support 
  • Jenkins plugin 
  • Comparing in process test runs with past versions
Testing

Opinions expressed by DZone contributors are their own.

Related

  • Testing Strategies for Web Development Code Generated by LLMs
  • Testing Is Not About Finding Bugs
  • Frame Buffer Hashing for Visual Regression on Embedded Devices
  • How to Interpret the Number of Spring ApplicationContexts in Integration Tests

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook