How to perform load testing using Selenium WebDriv

2019-03-09 02:04发布

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?

2条回答
\"骚年 ilove
2楼-- · 2019-03-09 02:42

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.

查看更多
我只想做你的唯一
3楼-- · 2019-03-09 02:47

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:

查看更多
登录 后发表回答