Cucumber .feature file is not getting linked to stepDefinition.java in Eclipse

Solution 1:

Steps to make it work.

  1. Clear out all the cucumber related plugins(e.g. Natural 0.9, cucumber eclipse plugin 1.0.0.xxxxx). Please do follow the suggestion of restarting your eclipse.
  2. Go to Help --> Eclipse Market place --> Install 'cucumber-eclipse' plugin. Please do follow the suggestion of restarting your eclipse.
  3. Right click on your project --> Configure --> Convert to Cucumber project.
  4. Now try to navigate to your step definition by 'Ctrl+click' on test step in feature file

Edit: I also changed JRE system library to 1.8( I am not sure it has any influence to make cucumber work )

Solution 2:

I had same problem that CTRL+Click was not working in feature files when I installed Natural plugin in Eclipse IDE. Later, I uninstalled Natural plugin, and installed "Cucumber Eclipse" plugin, and now I can perform ctrl+click on step name of feature file to navigate to the step definition file.

You can follow below stpes:

  1. Un-install Natural plugin

  2. Install Cucumber Eclipse plugin

Note: Below are my Eclipse version details. "Cucumber Eclipse" plugin may not be available for latest Eclipse version

Version: 2019-06 (4.12.0) Build id: 20190614-1200

Solution 3:

With the Cucumber Eclipse plugin, cleaning the Cucumber project (Project > Clean...) made the Gherkin steps Ctrl+click-able again.