Selenium 会定期进行自动烟雾测试
我实际上已经浏览了这里的 Selenium 问题,但没有找到我想要的东西。
基本上我有大约 10 个“用例”用于对我的网站进行冒烟测试。 基本的事情,例如用户是否可以登录,他们是否可以注册等。
我想按一定的时间间隔进行设置,例如每 10 分钟运行这些测试。
这可以通过 Selenium 远程控制实现吗? 有谁有可以向我指出的链接/教程吗? 我相当有信心这是可能的,但我只是不能 100% 确定如何将其全部设置和运行。
提前致谢。
I've actually looked through Selenium questions on here and didn't find quite what I was looking for.
Basically I have about 10 "use cases" for smoke testing my site. Basic things such as, can a user log in, can they register etc..
I want to set this up on an interval such as every 10 minutes run these tests.
Is this possible with Selenium Remote Control? Does anyone have a link/tutorial they could point me towards. I'm fairly confident this is possible but I'm just not 100% sure how to get it all set up and running.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,这可以通过 Selenium RC 来完成。 我的网站上有一些 Selenium 教程。 在使用 Selenium RC、C#/Nunit 和 Windows 计划任务开始检查我们的 Web 应用程序全天的速度之前,我已经设置了一个基本的用户体验监视器。
由于我建议使用 Selenium RC,因此您可以使用任何您想要编写测试的语言。
Yes this can be done with Selenium RC. I have some Selenium Tutorials on my site. I have set up a basic user experience monitor before using Selenium RC, C#/Nunit and Windows Scheduled tasks to start the job to check the speed of our web app through the day.
Since I recommend using Selenium RC you can use any language you want to write the test.
根据您正在使用的环境类型,您可以使用 JUnit 之类的东西和 hudson 之类的自动构建系统。 当出现问题时,这为您提供了各种通知基础设施。
我知道人们会针对测试和生产系统(使用固定用户)运行这样的脚本。 在测试环境中,您可以发现编程错误,在生产中,您可以在比 ping 或进程监视更有趣的级别评估系统的正常运行情况。
Dending on what kind of environment you're working with you could use something like JUnit and an automated build system like hudson. This gives you all sorts of notification infrastructure when something goes wrong.
I have known people to run a script like this against both test and production systems (with a fixed user). In test environments you can discover programming mistakes, in production you can assess the up-ness of your system at a far more interesting level than pings or process watching.
看一下 New Relic 的 Synthetics 产品,它包装了 Selenium 并提供定期运行和警报。
Take a look at New Relic's Synthetics product, which wraps Selenium and provides periodic runs with alerting.