如何使用Selenium WebDriver执行负载测试?

编程入门 行业动态 更新时间:2024-10-22 07:30:25
本文介绍了如何使用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.

通过链接:

通过在多台计算机上分布测试来扩展规模(并行执行)

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.

到目前为止,我已经利用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:

  • testng/doc/documentation-main.html#并行测试
  • blog.wedoqa/2013/07/how-to-run-parallel-tests-with-selenium-webdriver-and-testng-2/
  • www.mkyong/unittest/testng -selenium-load-testing-example/
  • testng/doc/documentation-main.html#parallel-tests
  • blog.wedoqa/2013/07/how-to-run-parallel-tests-with-selenium-webdriver-and-testng-2/
  • www.mkyong/unittest/testng-selenium-load-testing-example/

更多推荐

如何使用Selenium WebDriver执行负载测试?

本文发布于:2023-11-10 22:10:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1576594.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:负载   如何使用   测试   WebDriver   Selenium

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!