本文介绍了如何使用Selenium WebDriver执行负载测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用Selenium WebDriver为100个用户执行应用程序的负载测试.一次有100位用户登录并访问服务器.

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.

如何使用Selenium WebDriver执行此过程?

How to do this process using Selenium WebDriver?

推荐答案

更新如评论中所述,这是一个坏主意.如果您正在考虑使用Selenium Grid进行负载测试,请重新考虑您的用途,并验证Selenium Grid是否确实是您唯一的选择.

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.

免费解决方案:

Selenium提供了一个易于扩展的测试框架,称为 Selenium Grid.您可以在与 TestNG 一起创建可扩展的负载测试框架.

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.

通过链接:

从一个中心点管理多个环境,从而可以轻松地对多种浏览器/操作系统组合进行测试.

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.

到目前为止,我已经利用Selenium Grid对大约12个并发的浏览器会话进行了Web应用程序的负载测试.我使用了几种参考资料来实现此目的:

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/

这篇关于如何使用Selenium WebDriver执行负载测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 01:37