This project provides a useful base class for running JBehave test scenarios.
1 - Add dependency.
<dependency>
<groupId>com.agilarity</groupId>
<artifactId>jbehave-stories</artifactId>
<version>1.0.7</version>
</dependency>
2 - Specify the steps in your test class.
public class SmokeTest extends JBehaveStories {
@Override
protected List<?> createSteps() {
return Arrays.asList(new SmokeTestSteps());
}
}
3 - Put your story files under src/test/resources, at or below the same package as your test class.
4 - Run your test class as a normal JUnit test.