I am working with Intellij IDea and Appium and i have also installed cucumber. But i am unable to navigate to the step definition from the feature file by holding Ctrl button and clicking on the step.. It says "Cannot find declaration to go to". I have the step definition defined already but still it doesn't navigate.. Can any one suggest me any solution for this? Any help is appreciated.
6 Answers
Install the "Cucumber for Java" plugin in IntelliJ IDEA. It will give you the support you are asking for.
Search for plugins called Cucumber and you will find one written by Jetbrains that you want.
2 Comments
The Eclipse feature that you are describing is called "Open declaration" and according to the official Eclipse documentation, it will attempt to navigate to the exact definition of the selected element if the selected element is a reference or a declaration.
In this case, the feature file steps are not a declaration and not even a java file. That won't work.
2 Comments
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
Need to install Natural plugin which is available in eclipse market.
Then open your feature file, Just keep cursor on any step & click Fun+F3 key together, it will take you to steps definition file corresponding to the steps.
Note-> This works on Mac, i am not sure about other OS.
1 Comment
Use below plugins for navigation purpose.
Go to eclipse or any ide > install new s/w, provide this url > ok URL-> http://rlogiacco.github.com/Natural
Restart ide > open any feature file > press command key if you are using mac or press control in case of windows & focus on any line which is present in the feature file > click > it will take you to respective steps definition file & method.
Comments
Following 3 steps are quite handy while configuring any Cucumber project from new/existing in Eclipse:
- Install these 2 Plugins from Eclipse Marketplace - Cucumber Eclipse & Natural
- Right-click on project and select Configure -> Convert to Cucumber Project...
- Install pending Eclipse updates, if any.
This will solve the original problem of navigation to step definition file from feature file in Eclipse as well.
