Score:0

Purpose of Selenium in load testing

ca flag

What is the role of Selenium in load testing a webpage if it cannot generate 200 or 300 requests? I understand, the client side automation can be done. But how do I test my web application for a real environment for 1000 or 2000 concurrent users.

How do I basically do it ?

jp flag
You probably want to look there https://sqa.stackexchange.com/questions/tagged/load-testing
Score:2
cn flag

Selenium runs actual web browsers for automated testing of web sites. Most authentic user experience test short of a person actually looking at it, great for testing features. But consider the resource use of your favorite web browser, that is quite heavy.

Replaying HTTP on the wire can be much faster. Load testing tools are user-agent without the browser. Ideally captured from your real application traffic, and replayed at high speed.

Find a load testing tool you like. Fortunately HTTP is ubiquitous, so this may already exist. For example, The Grinder, Gatling, GoReplay, JMeter, Locust, Tsung. The intent to use these for load testing is apparent in their UI: requests per second is prominent.

Score:0
cn flag

As per Selenium documentation:

Performance testing using Selenium and WebDriver is generally not advised. Not because it is incapable, but because it is not optimised for the job and you are unlikely to get good results.

There are basically 2 constraints:

  1. There are some metrics and KPIs including but not limited to:

    • relationship between number of users and hits per second/response times/number of errors/etc.
    • network metrics like connect time, time to first byte, etc.
  2. Resource consumption, i.e. Firefox 95 needs 1 CPU and 2 GB of RAM per instance so for 1000 users you will need 1001 CPUs and 2 Terabyte of RAM

  3. Selenium limitations in terms of number of nodes in Grid (there is no official strict limit, however in case of hundreds of browsers I expect some certain issues with regards to throughput)

So I would recommend re-considering your approach and use a dedicated load testing tool for this

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.