有人遇到过硒测试结果不一致的问题吗?
我目前正在使用 Selenium RC 和 JUnit 来测试一些基本的登录和注册场景。问题是我的测试并不总是给出相同的结果。有时运行它们会很好并且测试会通过。其他时候,他们会在登录/注册过程中的某些时刻卡住并超时。我已经尝试调试这个很长一段时间了,但没有取得永久的成功。
Selenium 是否不稳定,其他人有类似的问题吗?
I'm currently using Selenium RC and JUnit to test some basic login and registration scenarios. The problem is that my tests don't always give the same results. Sometimes running them will be fine and the tests pass. Other times, they'll get stuck at certain points during the login/registration process and time out. I've been trying to debug this for a long time, but with no permanent success.
Is Selenium being flaky and has anyone else had similar issues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经使用硒三年了。有时我会遇到一些奇怪的情况,但通常是我的wine或软件问题。自动停止脚本或使用屏幕截图功能是一个很好的做法。看看问题的根源。
I have used selenium for 3 years. Sometimes I have some strange situations but usually it is my wine or software problem. It's good practice to auto stop script or use screenshot function. To see that source of problem.
是的,当我使用 Ajax 验证时,结果不一致。我正在使用 Yii 框架进行测试。我正在生成随机的有效密码,但有时 Selenium 运行得太快(!),导致 Ajax 无法集中注意力。
如果我将速度减慢到 100,它往往会工作五分之四。如果比这慢,测试就会慢得令人痛苦。
$this->setSpeed(100);
Yes, when I use Ajax validation the results are inconsistent. I am testing using the Yii framework. I am generating random valid passwords, but from time to time Selenium goes too fast (!) for the Ajax to focus.
If I slow down the speed to 100 it tends to work about four out of five times. Any slower than that and the tests are agonizingly slow.
$this->setSpeed(100);