使用 Selenium IDE 同时进行多个测试
我为我的网站编写了一个简单的测试。该测试只需在我的搜索页面中搜索一个单词并等待结果。
我需要的是同时运行相同的测试 40 次,以模拟 40 个用户同时搜索同一个单词的情况。
基本上我想知道如何同时运行它们而不是在队列中运行它们。
谢谢。
I have written a simple test for my website. The test simply search for a word in my search page and waits for results.
What I need is to run the same test 40 times simultaneously to mimic a situation where 40 users are searching for the same word at the same time.
Basically I want to know how to run them simultaneously not in a queue.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能需要的是 Selenium RC 和 Selenium Grid,因为 Silenium IDE 在自动化测试方面非常有限。 RC 允许您运行远程 selenium 测试(尽管 rc 也可以在本地运行),而 grid 允许您简化对所有正在运行的 rc 的访问。
您同时需要 40 个客户。如果您使用 selenium-rc,您可以通过将多个客户端配置为在不同端口上运行来同时启动多个客户端。之后您必须同时开始 40 次测试。这是棘手的部分,具体取决于您使用什么框架来启动测试。
我建议 JMeter 用于类似负载测试的情况。设置非常简单,您可以配置您的网站一次需要多少个模拟用户。 JMeter 适用于手动测试和自动化测试。
What you probably need is Selenium RC and Selenium Grid as Silenium IDE is quite limited on automated testing. RC allows you to run remote selenium tests (tho rc can run locally too) and grid allows you to simplify the access to all running rcs.
You need 40 clients at once. If you are using selenium-rc you can start severall clients simultaniously by configuring them to run on different ports. After that you have to start your test 40 times at once. That is the tricky part depending on what framework you are using to launch the tests.
I would suggest JMeter for load-test like situations. It is quite easy to setup and you can configure how many simulated users you want on your website at once. JMeter works fine for manuell tests and for automated tests.
不介意,但我想你需要在 Jmeter 中这样做,实际上你想要做的是负载/压力的一部分,其中许多用户尝试同时执行某些特定操作。看看 Jmeter。
Don't mind but I guess you need to do that in Jmeter, actually what you are trying to do is part of Load/Stress where number of user tries to do some certain action simultaneously. Have a look a Jmeter.