Hi,

We like to retrieve our stories directly from Jira. So, i found the following 
class: http://jira.codehaus.org/browse/JBEHAVE-653 (it's in the comments)

But for some reason it doesn't work properly with JUnitStories. I have the 
following configuration class. The sories doesn't get loaded. I hope anyone has 
some valuable suggestion.

Highly appreciated!
Roy


public class RunWebStories extends JUnitStories {

    private WebDriverProvider driverProvider = new SeleniumWebDriverProvider();
    private Configuration configuration;

    public RunWebStories() {
        Embedder embedder = configuredEmbedder();
        
embedder.embedderControls().doGenerateViewAfterStories(true).doIgnoreFailureInStories(true)
                .doIgnoreFailureInView(true).doVerboseFiltering(true);
    }

    @Override
    public Configuration configuration() {
        configuration = makeConfiguration(this.getClass(), driverProvider);
        configuration.useStoryLoader(new MyStoryLoader("username", "password", 
"query"));
        return configuration;
    }

    public static Configuration makeConfiguration(Class<?> embeddableClass, 
WebDriverProvider driverProvider) {

    }

    @Override
    public InjectableStepsFactory stepsFactory() {
        ApplicationContext context = new SpringApplicationContextFactory(
                "org/spilgames/" + System.getProperty("conceptName") + 
"/config/config.xml")
                .createApplicationContext();
        return new SpringStepsFactory(configuration(), context);
    }

    @Override
    protected List<String> storyPaths() {
        return null;
        //return new StoryFinder().findPaths(
        //        codeLocationFromClass(this.getClass()), "**/" + 
System.getProperty("conceptName") + "/stories/*.story",
        //        "**/excluded*.story");
    }

}

Reply via email to