24

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?

Yi Zeng
  • 32,020
  • 13
  • 97
  • 125
tsr_qa
  • 633
  • 3
  • 9
  • 27
  • This thread is now closed. Please take a look at [TurboSelenium](http://butlerthing.io/products). Using grid for load testing is not a good idea but there are newer tools that can do the job. – Ali Rad Apr 15 '19 at 22:35

2 Answers2

12

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:

Community
  • 1
  • 1
Vish
  • 2,144
  • 5
  • 25
  • 48
  • 15
    **This is a bad idea.** Selenium Grid parallel execution is meant to get your functional tests executed quicker by running them in parallel. It was never designed for performance testing and does not scale very well - making it unsuitable for any load-testing beyond trivial loads. Please the the General section here in Selenium Grid FAQ: http://www.seleniumhq.org/docs/07_selenium_grid.jsp – RaGe Apr 26 '15 at 12:51
  • 1
    Agree with @RaGe Selenium is not meant for load/performance testing, try JMeter – Farooq Mar 11 '19 at 14:15
  • Actually upon more research Locust looks really cool, new modern tool. https://locust.io – Farooq Mar 11 '19 at 14:40
9

Though it's not completely clear of what type of performance testing you are looking for

Selenium Webdriver is mainly meant for testing frontend functional cases and not meant for cranking up the front end with load testing.

So as I see it you might be looking for either one of these

JMeter

The API or the backend's performance testing for eg: the Login API looking for a free tool I would suggest Jmeter Hands down:

http://jmeter.apache.org/

JSP PAGES PEFORMANCE(WHITE BOX)

Frontend page rending or response times like a jsp page for this there seem to be many techniques but most point to white box testing such as this.

http://www.javaperformancetuning.com/tips/j2ee_srvlt.shtml#REF12

Hope it helps.

Anirudh
  • 2,286
  • 4
  • 38
  • 64