有没有办法在不运行 Cucumber 的情况下直接在 Eclipse 中生成步骤定义? [英] Is there a way to directly generate Step Definitions in Eclipse without Running Cucumber?

查看:19
本文介绍了有没有办法在不运行 Cucumber 的情况下直接在 Eclipse 中生成步骤定义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用 Eclipse 中的 Cucumber 和 Gradle 进行集成测试.

Im doing integration testing with cucumber and Gradle in Eclipse.

现在我的工作流程是

  1. 编写功能文件
  2. 运行它以生成步骤骨架
  3. 复制并实施它们

这适用于新功能等,但如果您有一个大功能并在中间或接近尾声实施新步骤,则变得相当麻烦.要获得新的步骤骨架,我需要运行整个功能.

This works good for new features and so on, but becomes quite bothersome if you have a large feature and implement new steps in the middle or towards the end. To get the new step skeletons I need to run the whole feature.

即使有

dryRun = true

这个选项会占用很长时间.

option this takes up a long time.

听说IntellyJ可以直接生成这些步骤骨架我想知道在 Eclipse 中这样的事情是否可行?

I have heard that IntellyJ can generate these step skeletons directly and I would like to know if something like this is possible in Eclipse?

推荐答案

不适用于 Eclipse,但作为权宜之计,它可能对您有所帮助:https://chrome.google.com/webstore/detail/tidy-gherkin/nobemmencanophcnicjhfhnjiimegjeo

Not for Eclipse, but it might prove helpful to you as a stop gap: https://chrome.google.com/webstore/detail/tidy-gherkin/nobemmencanophcnicjhfhnjiimegjeo

它能够从您粘贴到编辑器中的文本生成 Java 步骤定义.希望它在您等待 Eclipse 的答案时有所帮助.

It's capable of generating Java step defs from the text you paste into the editor. Hope it helps in some way while you await an answer for Eclipse.

这篇关于有没有办法在不运行 Cucumber 的情况下直接在 Eclipse 中生成步骤定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆