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
[cid:image001.png@01CEF721.23A3EC90]<eclipse-open:%E2%98%82=navitas-core/C:%5C/Users%5C/jorge_pombar%5C/.m2%5C/repository%5C/org%5C/jbehave%5C/jbehave-core%5C/3.8%5C/jbehave-core-3.8.jar%3Corg.jbehave.core.junit(JUnitStories.class%E2%98%83JUnitStories~storyPaths>List<eclipse-javadoc:%E2%98%82=navitas-core/C:%5C/Users%5C/jorge_pombar%5C/.m2%5C/repository%5C/org%5C/jbehave%5C/jbehave-core%5C/3.8%5C/jbehave-core-3.8.jar%3Corg.jbehave.core.junit(JUnitStories.class%E2%98%83JUnitStories~storyPaths%E2%98%82List><String<eclipse-javadoc:%E2%98%82=navitas-core/C:%5C/Users%5C/jorge_pombar%5C/.m2%5C/repository%5C/org%5C/jbehave%5C/jbehave-core%5C/3.8%5C/jbehave-core-3.8.jar%3Corg.jbehave.core.junit(JUnitStories.class%E2%98%83JUnitStories~storyPaths%E2%98%82String>>
 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:znu...@gmail.com]
Sent: Thursday, December 12, 2013 8:29 AM
To: user@jbehave.codehaus.org
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



<<inline: image001.png>>

Reply via email to