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
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: Launch Eclipse and navigate to 'Help->Install New Software'.
As there is no mechanism within Eclipse to permanently and physically uninstall a feature and its plug-ins, you will have to manually remove the files associated with the cucumber-eclipse features and plugin when Eclipse is not running. Warning Note: Be very cautious as to which files you delete, and always have a backup of your Eclipse directory.
In the Project tool window ( Alt+1 ), right-click the features folder and select Run all Features in: <directory name>. If there are other testing frameworks in your project, the IDE will prompt you to select how you want to run your tests: as Cucumber features or as tests of another framework.
The Cucumber feature files are run same way as the other executables, with certain run/debug configuration settings. Prior to running a test, you have to set up run/debug configuration for a particular feature file or scenario, or for the whole bunch of features within a directory.
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:
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With