Is there a way to directly generate Step Definitio

2019-03-23 09:51发布

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?

3条回答
▲ chillily
2楼-- · 2019-03-23 10:45

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.

查看更多
在下西门庆
3楼-- · 2019-03-23 10:47

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.

查看更多
老娘就宠你
4楼-- · 2019-03-23 10:48

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.

查看更多
登录 后发表回答