Mozilla 插件网站有一个测试存储库,尽管它是使用 Selenium 编写的。我想知道 Watir 是否有任何可用的实际示例,以便我可以了解专业人员如何实施该框架?
这是一个更普遍的问题,涉及如何在 Watir 中为网站构建一套测试。从表面上看,我们可以编写一堆单独的 .rb 文件并提供粗略的错误报告,然后将它们全部关闭。但我想更多地了解如何编写实际的类和适当的测试结构来提出问题并返回报告。这是怎么做到的?有这方面的书吗?教程?
There is a repository of tests for the Mozilla addons site, although it's written using Selenium. I'd like to know if there are any real-world examples available for Watir, so I can see how the framework is implemented by professionals?
This is a more general question about how one goes about building a suite of tests for a website in Watir. On a superficial level, one can write a bunch of seperate .rb files with crude error reporting and fire them all off; but I'd like to know more about writing actual classes and proper test structures that raise issues and return reports. How is this done? Are there any books on this? Tutorials?
发布评论
评论(4)
查看 WatirMelonCucumber -针对 google 和 bing 的一组 watir-webdriver 测试,以及 EtsyWatirWebDriver - 一组针对 Etsy.com 的 watir-webdriver 测试
Check out WatirMelonCucumber - a set of watir-webdriver tests against google and bing, and also EtsyWatirWebDriver - a set of watir-webdriver tests against Etsy.com
watir Wiki 还提供一系列教程、示例等。
然而这些是相当基础,不要进入“如何组织事物”的层面。
在这种情况下,有许多处于不同开发状态的框架。我认为最活跃的可能是 Taza 和 QA Robusta。他们每个人处理事情的方式都略有不同。 QA Robusta 有点围绕 Minitest(如果我理解正确的话)并提供它自己的报告。我还在了解 Taza,所以不能对它发表太多评论。我还记得听说过最近的 WatirSpash' gem/framework http://watirpodcast.com/" rel="nofollow">watir podcast 旨在帮助 watir 与 RSpec 一起使用(我可能会假设 Cucumber)
如果您是BDD/Spec-by-example 排序,那么您可能想要使用 RSpec 或 Cucumber 中的一个(或两者)与 WatirSpash gem 结合使用作为组织和描述测试的方式,然后通过 Watir 实现实际的测试代码,在这种情况下,您可能会使用由 RSpec/Cucumber 生成的基于 HTML 的报告,而不是自行编写或依赖 watir 框架来生成报告。
The watir Wiki has a selection of tutorials, examples etc as well.
Those are however fairly basic and don't get into the 'how to organize things' level.
In that case there are a number of frameworks in various states of development. The most active ones are I think are perhaps Taza, and QA Robusta. Each of them approaches things a little differently. QA Robusta is wrapped a bit around Minitest (if I understand things right) and provides it's own reporting. I'm still learning about Taza so can't really comment on it much. I also recall hearing about a 'WatirSpash' gem/framework that was discussed in a recent watir podcast which is designed to help watir use along with RSpec (and I might presume Cucumber)
If you are a BDD/Spec-by-example sort, then you may want to use either (or both) RSpec or Cucumber perhaps in combination with the WatirSpash gem as a way to organize and describe you tests, and then implement the actual test code via Watir, In that case you would likely be using the HTML based reports that can be generated by RSpec/Cucumber instead of rolling your own or depending on a watir framework for the reporting.
更多 Watir 框架:
https://github.com/jarmo/WatirSplash
https://cyberconnect.biz/opensource/qa_robusta.html
未积极开发:
https://github.com/scudco/taza
https://github.com/bret/watircraft
More Watir frameworks:
https://github.com/jarmo/WatirSplash
https://cyberconnect.biz/opensource/qa_robusta.html
Not in active development:
https://github.com/scudco/taza
https://github.com/bret/watircraft
QA Robusta 很可能不会添加太多新功能,但会受到支持。相反,您可能想查看 whirlwind。 Whirlwind 使用与 qa_robusta 和 taza 等其他框架类似的概念,但重量更轻,并且围绕 cucumber/rspec 进行定制。请参阅 Google 的演练搜索示例。
QA Robusta most likely will not have too many new features added but will be supported. Instead you may want to check out whirlwind. Whirlwind uses similar concepts as other frameworks such as qa_robusta and taza, but is lighter weight and tailored around cucumber/rspec. See the walk through for a google search example.