问题
I'm new to GHERKIN-CUCUMBER. so please anyone guide me to find solution to my problem. "How to generate or implement Step definitions (from feature files) programmatically in JAVA?"
回答1:
There are multiple tutorials you can follow on the net.
I wrote one a couple of years back that may be a starting point http://www.thinkcode.se/blog/2014/05/29/cucumberjvm-hello-world The versions are outdated, but it will work, And when you get it to work, update the versions of the dependencies.
Another source of malformation may be the getting statred project supplied by Cucumber, https://github.com/cucumber/cucumber-java-skeleton
I would advice not to look to hard for anything that generates the steps. Cucumber will suggest code snippets for missing steps. They are a good start but they will need some attention.
来源:https://stackoverflow.com/questions/44669406/how-to-implement-step-definitios-from-gherkin-feature-files