This behaviour independent of the IDE.   It only depends on JUnit integration, which all IDEs support.

On 12/12/2013 19:01, Jorge Pombar wrote:

Hi Marius,

Full disclosure I don’t use Intellij, we use Eclipse instead. Let me share what I know

JBehave will run all the stories that this method returns

Open DeclarationList<String> storyPaths()

 

I think that the default implementation is that it finds all the “.story” files found in the target dir.

We overwrote the method in order to be able to choose which story to run

 

Our implementation has 2 flows:

·         If a System prop we call storyFilter is defined then we only run the stories that match it (we use this when running from cmd line)

if(storyFilter != null) {

      //if this param is set then only run the those stories

      return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()).getFile(), asList("**/" +

                  storyFilter + ".story"), null);

}

·         Otherwise, we have a separate “allStories.seq” file that lists all of our stories. This flow reads this file and returns all the stories that are not commented out as a list.

 

This is how we control what stories we want to run on each execution.

 

Thanks,

Enrique

 

From: Marius Bob [mailto:[email protected]]
Sent: Thursday, December 12, 2013 8:29 AM
To: [email protected]
Subject: [jbehave-user] How to run specific .story file from IDE

 

How to tell jBehave to run specific .story files? I’m using Intellij IDEA

Let's say I have 3 .story files which include different scenarios and, at some point, I want to run only a .story file.

 

I don't figure out from the documentation. Maybe I'm missing something again

 

Thanks

 

 

 


Reply via email to