Search code examples
intellij-ideacucumbercucumber-jvmgradlewkarate

In Karate DSL Framework, IntelliJ IDE is unable to find visible feature files using Gradle


When using the following tools to create a sample Karate DSL Test; a "no features found at [classpath: packagename]" is thrown:

IntelliJ 2017.2.3 Gradle 2.9

project structure is shown in screenshot. Note that I have used the exact same project structure in Eclipse Mars 4.5.2 with Gradle and I was not able to replicate this issue. I also used Maven with Intellij and this issue did not occur.

The issue is isolated to Intellij using Gradle! any thoughts?

enter image description here


Solution

  • My best guess is IntelliJ Gradle does not honor the sourceSets tweak needed for the recommended Karate folder structure.

    I just had an idea, try switching to the "traditional" Java project structure where *.feature files are in src/test/resources (not src/test/java) and that might just work.

    Example project structure, from IDEA 2017.2.6 with Gradle.

    idea-gradle-structure