Is there a way to directly generate Step Definitions in Eclipse without Running Cucumber?

蹲街弑〆低调 提交于 2019-12-09 07:57:13

问题


Im doing integration testing with cucumber and Gradle in Eclipse.

For now my workflow is

  1. Write a feature file
  2. Run it to generate step skeletons
  3. Copy and implement them

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.

Even with the

dryRun = true

option this takes up a long time.

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?


回答1:


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

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.




回答2:


Yes there is a nice plugin for Eclipse that also has even more benefits: Cucumber People The only Problem I got is, that it checks the steps after every save in the Cucumber console.

I also used the Natural plugin before.




回答3:


Why is this a problem in Eclipse? If the feature file is big, then you only copy the modified scenario to a new feature file, and generate steps based on the new feature file.



来源:https://stackoverflow.com/questions/30138833/is-there-a-way-to-directly-generate-step-definitions-in-eclipse-without-running

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!