Reputation: 3216
I can't find in the documentation where cucumber-jvm looks for .feature files.
I created a project from the cucumber-jvm maven archetype and mvn test find the sample feature files without problems but there is no configuration.
Then I created a project from there maven project archetype, and mvn test doesn't find a feature file I created. And would like to understand why.
Upvotes: 1
Views: 1039
Reputation: 12019
Assuming you are using Cucumber-JUnit. Create an empty class that uses the Cucumber JUnit runner.
package com.example;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
public class RunCucumberTest {
}
This will execute all scenarios in same package as the runner (com.example
), by default glue code is also assumed to be in the same package. The @CucumberOptions can be used to provide additional configuration to the runner.
So if you're using maven then you put your features in /src/test/resources/com/example/
.
From: https://github.com/cucumber/cucumber-jvm/tree/master/junit
Upvotes: 4