问题
Im doing integration testing with cucumber and Gradle in Eclipse.
For now my workflow is
- Write a feature file
- Run it to generate step skeletons
- 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