Skip to content

agilarity/jbehave-spring-stories

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stories in Ready Build Status

This project provides a useful base class for running JBehave test scenarios with injected steps using Spring.

Usage:

1 - Add dependency.

<dependency>
    <groupId>com.agilarity</groupId>
    <artifactId>jbehave-spring-stories</artifactId>
    <version>1.0.3</version>
</dependency>

2 - Add a Spring annotated resource class.

@Configuration
@ComponentScan("com.agilarity.examples.smoke.steps")
public class SmokeTestResources {

}

3 - Specify the resource in your test class.

    public class SmokeTest extends SpringJBehaveStories {
    
        @Override
        protected String[] getSpringResources() {
            return new String[] { SmokeTestResources.class.getName() };
        }
    }

4 - Add the @Component annotation to you steps so Spring will wire it up.

5 - Put your story files under src/test/resources, at or below the same package as your test class.

6 - Run your test class as a normal JUnit test.

About

Make it easier to setup and run JBehave tests with Spring

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages