How to perform load testing using Selenium WebDriver?

tsivarajan picture tsivarajan · Apr 7, 2014 · Viewed 63k times · Source

I have to perform the load testing the application using Selenium WebDriver for 100 users. 100 users login and hit the server at a time.

How to do this process using Selenium WebDriver?

Answer

Vish picture Vish · Apr 7, 2014

UPDATE As mentioned in the comments, this is a bad idea. If you are considering Load Testing with Selenium Grid, reconsider your purpose and verify whether Selenium Grid really is the only option you have.


For a free solution:

Selenium provides an easily scalable testing framework called Selenium Grid. You can use this in conjunction with TestNG to create a scalable load-testing framework.

From the link:

scale by distributing tests on several machines ( parallel execution )

manage multiple environments from a central point, making it easy to run the tests against a vast combination of browsers / OS.

minimize the maintenance time for the grid by allowing you to implement custom hooks to leverage virtual infrastructure for instance.

I have leveraged Selenium Grid to load-test our web-app with about a dozen concurrent browser sessions (so far). I used several references to achieve this: