0

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:

  1. Visited these existing Stackoverflow links IntelliJ with cucumber (java) and step definition location Undefined step definitions in IntelliJ
  2. Did a 'Invalidate caches and restart' of my IntelliJ.
  3. 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.
  4. Disabled the plugins (Cucumber for Java, Cucumber for Groovy, Gherkin), did a restart and then enabled them back.
  5. 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?

koder
  • 35
  • 9
  • Please check https://stackoverflow.com/a/47235582/2000323 – Andrey Sep 16 '20 at 06:19
  • @koder Possibly the Cucumber plugins have not upgraded yet. They are usually a bit behind the IntelliJ updates. – Mate Mrše Sep 17 '20 at 06:47
  • If you continue see the problem please file a [YouTrack issue](https://youtrack.jetbrains.com/newIssue?draftId=25-2969833) with a small reproducer. Thanks. – Andrey Sep 21 '20 at 07:55

0 Answers0