Hi,
Consider controlling the stories from outside your code, which might be true if you allow QA department to control which stories to run automated after development is done.

Example:
@Override
protected List<String> storyPaths() {
try { return Arrays.asList(System.getProperty(“storyfiles”).split(",")); } catch (NullPointerException | SecurityException | IllegalArgumentException e) { throw new RuntimeException("System property 'storyfiles' was not available during startup.", e); }
}

Example of a gradle task that will run the stories if you have extended JUnitStories:
task runJBehaveTests(type: Test) {
file('target').mkdirs()
FileTree tree = fileTree(dir: 'src/test/resources')
tree.include '*/.story'
String storyfiles = ""
tree.each { file -> storyfiles += "," + file.getName() }
storyfiles = storyfiles.replaceFirst(",","")
System.out.println("This test will run following stories: "+storyfiles)
systemProperty 'storyfiles',storyfiles
}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to