Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cucumber features are not being recognized by Eclipse

I have installed Natural 0.7.6 version plugin from Eclipse Market and the installation was successful. I tried Cucumber feature and Eclipse is not recognising the same.

After installing Natural 0.7.6, I created a "Features" package and added a file called "login.feature" The keywords like Scenario, When, Given aren't getting highlighted.

Feature: Macys Login Feature

Scenario: Macys Login Test Scenario

Given User is already on Login Page
When title of login page is Macys
Then user enters Username
like image 282
Chaitanya Maligi Avatar asked Oct 24 '25 10:10

Chaitanya Maligi


2 Answers

Even though it changes the icon of your file(see below OpenWebPage.Feeature) and it looks in green round, by default the editor remains the text editor

Right click with the file being open and select Cucumber Editor

enter image description here

Now the colors will automatically change, as now the editor is changed and would look like below

enter image description here

All credits too http://go-gaga-over-testing.blogspot.com/2014/10/eclipse-cucumber-plugin-syntax.html as i also faced the same problem and this helped me

like image 70
Gaurav Khurana Avatar answered Oct 25 '25 22:10

Gaurav Khurana


It may be because of the plug-in you installed not compatible with version of eclipse. You should check supported version on plugin page. I am using qaf bdd editor for eclipse and it works fine for me. It supports Kepler (4.3) or above up to latest and works well for feature file written in gherkin with cucumber step implementation.

like image 24
user11353541 Avatar answered Oct 26 '25 00:10

user11353541