Cucumber step definitions in .feature file not highlight

Software Quality Assurance & Testing Asked by Sachintha on January 6, 2022

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?

3 Answers

In the 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

Answered by Wilson Manuel Rojas on January 6, 2022

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....

Answered by Sowji on January 6, 2022


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

Check all the options in Cucumber like following

enter image description here

Answered by Sachintha on January 6, 2022

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP