I have developed automation scripts for end to end workflows using selenium webdriver io for my web application. I want to use same scripts for load testing. My requirement is to test web UI along with backend APIs for 20K users. Can you please suggest how I can achieve it with Selenium?
1 Answers
For 20K users you will need 20k browsers, for 20k browsers you will need I don't know how many in reality, but looking into Firefox 87 system requirements:
- a CPU core per browser instance
- 2 GB of RAM per browser instance
If you have such a supercomputer somewhere or possess a budget to kick off that many machines in cloud - you can scale your Selenium tests using i.e. K8S cluster
However it might be a better idea considering converting your Selenium tests into HTTP-protocol-based load tests, the majority of load testing tools provide HTTP Proxy server for recording tests so you can replay your Selenium tests via this proxy and get them converted into a load testing tool script.
Protocol-based tests have much smaller footprint in terms of CPU and RAM so you should be able to use reasonably small hardware for conducting your tests.

- 159,985
- 5
- 83
- 133
-
Okay, thanks for your reply. If I want to test frond end of the application (Web UI) under a load, is there any other tool I can use? – Swapnil H Apr 14 '21 at 08:48
-
Use a load testing tool to create the load and use Selenium with 1-2 threads for checking the frontend performance. If you're looking for a specific tool you can consider [Apache JMeter](https://jmeter.apache.org/), it is possible to quickly [convert Selenium tests to JMeter](https://www.blazemeter.com/blog/how-convert-selenium-scripts-jmx-converter) and there is JMeter integration with Selenium via [WebDriver Sampler](https://jmeter-plugins.org/wiki/WebDriverSampler/) you you can use [Taurus](https://gettaurus.org/) for running both side-by-side – Dmitri T Apr 14 '21 at 08:54