我可以使用 Selenium IDE 生成 Cucumber/Capybara 步骤吗?
我已经安装了 Selenium IDE(Firefox 插件)和 Capybara(gem)。我现在在我的 Rails 应用程序中从 Cucumber/Capybara 步骤 (@javascript) 驱动 Selenium。
问题是:
我可以将 Selenium IDE 步骤导出为 Cucumber/Capybara 步骤吗?
在 Selenium IDE 选项 > 中格式 我只能看到 Ruby (Test::Unit) 和 RSpec,但是如果还有 Capybara 格式那就太棒了。
谢谢。
I've both installed Selenium IDE (Firefox addon) and Capybara (gem). I'm now driving Selenium from Cucumber/Capybara steps (@javascript) in my rails app.
The question is:
Can I export Selenium IDE steps as Cucumber/Capybara steps?
In Selenium IDE Options > Format I can only see Ruby (Test::Unit) and RSpec, but having Capybara format as well would be awesome.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不认为可以将 Selenium IDE 测试导出为 Cucumber 场景。老实说,我什至不相信构建这样一个导出器是否有意义 - Selenium IDE 测试专注于测试的技术交互 - 单击此按钮,在该字段中输入内容,等待此页面加载。好的 Cucumber 测试侧重于更高级别的用户操作 - 对于医疗保健系统,您的 Cucumber 测试可能包含“当我接纳一位名为 Joe Blow 的新患者时”,而不是“当我单击新患者链接时并且我输入第一个” Joe 的名字,我输入了 Blow 的姓氏”。您也许能够定义某种匹配器来将技术交互的某些组合识别为更高级别的抽象,但这将高度依赖于每个被测试的系统。
我还没有使用过 Capybara,所以我不确定导出到该格式是否可行。
I don't believe it is possible to export Selenium IDE tests as Cucumber scenarios. Honestly, I'm not even convinced that it would make sense to build such an exporter - Selenium IDE tests are focused on the technical interactions of the test - click this button, type into that field, wait for this page to load. Good Cucumber tests are focused on higher-level user actions - for a healthcare system, your Cucumber tests might have "When I admit a new patient named Joe Blow" in them rather than "When I click the new patient link And I enter a first name of Joe and I enter a last name of Blow". You might be able to define some sort of matcher to recognize some of these combinations of technical interactions into the higher level abstractions, but it would be highly dependent on each system under test.
I haven't yet used Capybara, so I'm not sure whether an export to that format would be feasible.