I am using JUnit test configuration to run my test and feature file properly recognized its relevant step definitions. After a recent IntelliJ update (to Ultimate 2020), my feature file shows all the Gherkin statements as undefined. Even when I try to create a dummy one using the 'Create Step Definition' link by hovering over, it complained 'Incorrect step definition directory path' for File Location. These are things that I followed:
- Visited these existing Stackoverflow links IntelliJ with cucumber (java) and step definition location Undefined step definitions in IntelliJ
- Did a 'Invalidate caches and restart' of my IntelliJ.
- My project structure is src/main/java/xxxx/stepDefinitions (for my .java step definitions) and src/main/resources/features (for my .feature files). Already marked my 'resources' as 'Test Resources Root' and the 'java' as 'Sources Root'. Ensured that they are still the same after update.
- Disabled the plugins (Cucumber for Java, Cucumber for Groovy, Gherkin), did a restart and then enabled them back.
- Edit configurations' JUnit runner was not disturbed after the update. I have no glue settings here and having them in my JUnit Runner class. Here is a short snippet. Also, deleted all existing configurations and kept only JUnit.
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"classpath:features"}
,glue = "xxxx/stepDefinitions"
,tags = {"@xxx","@yyyy"}
,plugin ={"com.vimalselvam.cucumber.listener.ExtentCucumberFormatter:target/report/report.html"}
)
Can someone please help out with any missing steps and resolve my problem?