I've built a simple project structure following the documentation https://github.com/karatelabs/karate#folder-structure
runner class:
public class HealthCheckRunner {
@Karate.Test
Karate healthCheck(){
return Karate.run("healthCheck").relativeTo(getClass());
}
}
output:
java.lang.RuntimeException: not found: steps/healthcheck/healthCheck.feature
Approaches I've tried:
return Karate.run().relativeTo(getClass()); -> org.opentest4j.AssertionFailedError: no features or scenarios found: [classpath:steps/healthcheck]
return Karate.run("healthCheck"); -> org.opentest4j.AssertionFailedError: no features or scenarios found: [healthCheck]
return Karate.run("classpath:steps/healthcheck/healthCheck.feature"); -> java.lang.RuntimeException: not found: steps/healthcheck/healthCheck.feature
I've tried run from Run_Api_Test which is a runner above feature file, got the same results
I can run the feature file directly with intellij cucumber plugin. But not working with junit runner.
my POM:
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.0-M1</version>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-junit5</artifactId>
<version>1.2.0</version>
</dependency>