Run as cucumber feature not showing in eclipse

46,297

Solution 1

As, when you open a feature file in Eclipse and right-click, then you do not find an option 'Run As->Cucumber Feature', it appears that your Eclipse do not have the required Cucumber Eclipse Plug-in. You can install this plug-in using following steps:

  1. Launch Eclipse and navigate to 'Help->Install New Software'.
  2. Click on 'Add' button
  3. Enter any name e.g. 'Cucumber' and type 'http://cucumber.github.com/cucumber-eclipse/update-site' as location.
  4. Click on OK.
  5. 'Cucumber Eclipse Plugin' option will appear in the available software list.
  6. Select the check box against it and click on 'Next' button.
  7. Read the terms of license agreement and click on 'I accept the terms of the license agreement” if you agree with the license terms.
  8. Click on 'Finish' button.
  9. Let it install, it will take few seconds to complete.

After successful installation of this plug-in, if you open any feature file (i.e. file with .feature extension) and right-click, you should see 'Run As->Cucumber Feature' option.

Update 1

In Eclipse, go to 'Windows->Preferences->Run/Debug/Launching/Launch Configuration' and uncheck 'Cucumber Feature' checkbox if it is checked. Refer to below screen shot for more details:

enter image description here

Solution 2

If it is a maven project make sure you have included it as a dependency. If you are running it as automation it would be a good idea to set it up as a maven project.

It's hard from your brief description, but if you are seeing the 'Run as Cucumber Feature' but it isn't doing anything, I had to open up the feature, right click on the white space in it, and then run as Cucumber Feature there. For some reason that worked for me.

Share:
46,297
Admin
Author by

Admin

Updated on July 05, 2022

Comments

  • Admin
    Admin almost 2 years

    I am new to automation. Im facing this problem while running cucumber feature. It doesnt show run as Cucumber feature option at all

    Screen shot of Run as options in eclipse

  • Admin
    Admin about 7 years
    I have already installed cucumber jvm eclipse plugin through marketplace.eclipse.org/content/cucumber-jvm-eclipse-plugin (It still doesnt work)
  • Admin
    Admin about 7 years
    Please see the attached screen shot of the (Run as options showing in eclipse)
  • canpan14
    canpan14 about 7 years
    As Mahipal stated, try uninstalling the plugin you installed and go to help -> install new software. And use this https://cucumber.io/cucumber-eclipse/update-site . Sometimes reinstalling just fixes the problem. I grabbing this link right off of the cucumber site and have used it to install cucumber just yesterday.
  • Mahipal
    Mahipal about 7 years
    Even after re-installation, if you still face the same issue, you can check one additional configuration. Refer to Update 1 in my answer above.
  • Admin
    Admin about 7 years
    I really appreciate your time and effort. Now it shows Run as cucumber feature, however it doesnt run when I click on that.
  • Admin
    Admin about 7 years
    I really appreciate your time and effort. Now it shows Run as cucumber feature, however it doesnt run when I click on that.
  • Mahipal
    Mahipal about 7 years
    Do you see any errors, when you run feature file as Cucumber feature?
  • canpan14
    canpan14 about 7 years
    I myself had a lot of issues with the run as cucumber feature. Also a problem with the run as cucumber feature is it wont output a report. I prefer to run as maven test which will run all the features.