Ok, so I\'m working on a project using IntelliJ and trying to take advantage of its cucumber functionality. I\'ve not worked with the java flavour of cucumber, but IntelliJ
Go File->Settings--> plugins Then you can manage cucumber plugin as shown below This should redirect you to step definition when you click your test.
Hope this helps
It is really nonsense :) but in in my case when IDEA refused to add steps definition automatically due to some plugins installed, e.g. Cucumber for Scala and suggested deleting them that i cant since i need them in other project. So, long story short, to add (Create step definition) you need to create Class in 'glue' dir and some fake Cucumber implementation, build one more time and it resolved my issue.
Background:
When I use IDEA 2018.2
And Java 8
And Cucumber info.cukes:cucumber-java:1.2.4
@When("^I created a Class and put there fake step implementation$")
@And("^I run gradle build one more time :)$")
@Then("^This Class will be able for me from the feature file by ALT+ENTER as usual$")
@And("^It resolved my issue when I was not able to automatically generate step definition$")
You can set the glue location globally by opening "Edit Configurations -> Defaults -> Cucumber Java -> Glue" and add the package names.
(IntelliJ 12.1.4)
Creating self answer for others who might have this problem. My project did not have the steps marked as test source root, and although I DID do this, it was not until I closed and reopened my project that they were picked up. So a simple restart was my answer.
IntelliJ supports a plugin for Cucumber-Java/Groovy. Installing this plugin will enable the navigation from Steps mentioned in the feature file to the Step Definitions.
And after creating the Step Definition, navigation is easily possible
I go in EditConfiguration, Glue section and i put the path from the package above and the package where is your class for steps, ex: CucumberFramework.stepsDefinitions