How to perform load testing using Selenium WebDriver? [closed]

戏子无情 提交于 2019-12-03 03:42:02

问题


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?


回答1:


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:

  • http://testng.org/doc/documentation-main.html#parallel-tests
  • http://blog.wedoqa.com/2013/07/how-to-run-parallel-tests-with-selenium-webdriver-and-testng-2/
  • http://www.mkyong.com/unittest/testng-selenium-load-testing-example/



回答2:


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.



来源:https://stackoverflow.com/questions/22903630/how-to-perform-load-testing-using-selenium-webdriver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!