eclipsecucumbergherkinfeature-file

How to configure Cucumber feature file in Eclipse?


I have a feature file as below:

Feature: Log in to the application

@OnlyOneTime
  Scenario: Login to application as valid user
    When User enter the valid credentials
    And Click on Login
    Then Home Page should be displayed

  Scenario: Login to application as Invalid user
    When User enter the inValid credentials
    And Click on Login
    Then Error Message Should be displayed

But the problem is it is being shown as plain file not at all with the gherkin colors, also I can't see find step option when I right click on a step.

enter image description here


Solution

  • I found an answer :

    When everything is installed right, and if feature file does not display the gherkin colors, We need to first create a sample cucumber.feature file in the same path.

    Once this is created if it is auto-populated with sample gherkin code, then other feature file will also work or we can simply paste content of our feature file into cucumber.feature and then rename it.