我可以使用 Selenium IDE 生成 Cucumber/Capybara 步骤吗?

发布于 2024-10-08 09:50:39 字数 311 浏览 0 评论 0原文

我已经安装了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

雪落纷纷 2024-10-15 09:50:39

我不认为可以将 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文