Skip to content
Latchkey

Karate "feature not found" / no features to run in CI

Karate could not locate the .feature file at the path you gave it. In CI this is a classpath or working-directory issue: the feature is not on the test classpath, or the relative path does not resolve where the job runs.

What this error means

Karate fails with "not found: classpath:features/users.feature" or the runner reports no features were found and zero scenarios executed.

Karate
com.intuit.karate.core.FeatureParser - not found: classpath:features/users.feature
0 scenarios (0 passed)
0 features (0 executed)

Common causes

The feature is not on the test classpath

A classpath: path only resolves if the file is under a resources root that the build copies to the classpath; otherwise Karate cannot find it in CI.

A relative file path resolved from the wrong directory

A non-classpath path is resolved from the job working directory, which in CI differs from where you ran locally.

How to fix it

Place features under a resources root

  1. Keep .feature files under src/test/resources (or a configured resources dir).
  2. Reference them with a classpath: prefix so the build resolves them.
  3. Confirm the build copies test resources onto the classpath.
Java
Results results = Runner.path("classpath:features")
    .tags("~@ignore").parallel(4);

Use a path relative to the repo root

For a non-classpath run, pass a path that resolves from the job working directory and verify it with a directory listing.

.github/workflows/ci.yml
- run: ls -la src/test/resources/features
- run: mvn -q test

How to prevent it

  • Store features under a resources root and use classpath references.
  • Verify the file exists in the step before running.
  • Avoid path assumptions that only hold in your local checkout.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →