2

In my project, I create simple feature file in my maven project using cucumber syntax.

Login.feature file

but IntelliJ IDEA, not highlight steps in feature file and also I cant use ALT+ENTER key to create step definition

I added the cucumber-java dependencies and also installed the Gherkin and cucumber plugins, but still feature files aren't recognized as they should be. What could be the problem?

  • Any error messages? – Yu Zhang Feb 14 '18 at 17:59
  • Nope, no any error message – Sachintha Feb 14 '18 at 18:07
  • Getting "No Definition found" for each steps in Feature file however i have mentioned glue of these steps in Step Definition file. Working on eclipse. Please help me out with this issue. -Sonal – user43357 Jan 30 at 6:14
2

Solved

File --> Settings--> Editor --> Inspection And

Check all the options in Cucumber like following

enter image description here

| improve this answer | |
0

In the TestRunner.java file. I added the following code: "stepNotifications = true"

package cucumberOptions; import org.junit.runner.RunWith; import io.cucumber.junit.Cucumber; import io.cucumber.junit.CucumberOptions;

@RunWith(Cucumber.class) @CucumberOptions( features="src/test/java/features/Login.feature", glue="stepDefinations", stepNotifications = true) public class TestRunner {

}

enter image description here

| improve this answer | |
-2

I too get same problem when tried to create from the scratch. I have found this solution

  1. go to file
  2. then click settings
  3. then click File Types
  4. then find Cucumber Scenario and enter *.feature in Registered pattern

Hope this helps....

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.