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!

Related Questions

Random pause of 2 to 5 seconds between requests Jmeter

1  Asked on November 28, 2021 by denis-filatov


Script timeout in Protractor

2  Asked on November 21, 2021 by ingridd-brito


Find button class with Selenium on Python

2  Asked on November 19, 2021 by nizariansyah-agung


Should Testers be called QA?

4  Asked on October 25, 2021 by jainam


Problem implicit wait with wait.until

1  Asked on October 25, 2021 by markus-pallasch


Ask a Question

Get help from others!

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