Nagarjuna Reddy
Nagarjuna Reddy

Reputation: 819

Feature file not getting formatted in Cucumber format

In eclipse, for cucumber feature file using for selenium,

  1. When a feature file was opened, the feature file used to show in cucumber/gherkin format which doesn't show anymore.
  2. When a feature file is created, sample features used to be created
  3. When a feature is executed using dry run, Step definitions used to be created.
  4. src/test/java and src/test/resources are showing greyed out in eclipse which was not the case.

Above mentioned three things are not happening any more which used to work earlier. I believe it's related to the set up of eclipse. I know the issue, not sure what details might be required. So please do let me know what might be required so that I can share here.

Eclipse Version:

Version: 2019-09 R (4.13.0)
Build id: 20190917-1200

Upvotes: 0

Views: 9023

Answers (3)

BalM
BalM

Reputation: 1

Associating feature file type with cucumber in Selenium WebDriver

I don't know the reason but I am also having a similar problem occasionally. When you over the file name go to the file tab and choose properties and then choose Associate with File Type --> then choose cucumber. I hope it helps.

Upvotes: 0

Nagarjuna Reddy
Nagarjuna Reddy

Reputation: 819

  1. When a feature file was opened, the feature file used to show in cucumber/gherkin format which doesn't show anymore.

Changed the default editor to cucumber, Not sure how default editor was changed

  1. When a feature file is created, sample features used to be created

After changing the default editor to cucumber, this started working

  1. When a feature is executed using dry run, Step definitions used to be created.

Added this parameter in the

@CucumberOptions(plugin = {"pretty","summary"})
  1. src/test/java and src/test/resources are showing greyed out in eclipse which was not the case.
Not sure, but this is not creating any issues so far

Upvotes: 0

Shubham Jain
Shubham Jain

Reputation: 17593

That means either your editor is disable or corrupted.

1)

Try to open your feature file again as below:

enter image description here

Select other if cucmber editor not shown.

2)

Uninstall the cucumber plugin and install again.

Refer below link to uninstall the plugin from eclipse

Correct way to remove plugin from Eclipse

Upvotes: 0

Related Questions