需要帮助为 Rails 应用程序设置基于 UI 的测试
我领导的团队开发基于 Ruby on Rails 的应用程序。由于应用程序很小,自动化测试并没有受到太大的重视。但最近它的规模开始扩大。我正在认真考虑在团队中强制执行测试纪律。
对于所有正在提交的新代码,我希望我的开发人员实现 100% 的代码覆盖率。但问题是他们不愿意为 UI 相关的更改编写测试。我在网上看到Selenium是UI测试的解决方案之一。
任何人都可以与我分享博客或教程的链接,教我如何为 Rails 设置 Selenium 或其他一些自动化 UI 测试。我使用的版本是2.3.8。
I am leading a team which develops application based on Ruby on Rails. Since the application was small, automated testing was not given much importance. But lately it has started growing in size. I am seriously thinking of enforcing the testing discipline in the team.
For all the new code that is being committed, I want my developers to do a 100% code coverage. But the problem is that they are resistant to write tests for UI related changes. I read online that Selenium is one of the solutions for UI testing.
Can anyone share me a link to blog or tutorial which teaches me how to set up Selenium or some other automated UI testing for Rails. The version I use is 2.3.8.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看两个主流的验收测试框架:
最好的起点(在我看来):Railscasts。尝试从 Cucumber 开始railscast。
您的“代码”最终看起来像
http://iain.nl/ 上找到的代码2011/01/黄瓜VS牛排/
Checkout the two mainstream Acceptance testing frameworks:
Best place to start (in my opinion): Railscasts. Try the beginning with cucumber railscast.
Your "code" will end up looking like
Code found on http://iain.nl/2011/01/cucumber-vs-steak/