net.thucydides.jbehave
Class ThucydidesJUnitStories

Package class diagram package ThucydidesJUnitStories
java.lang.Object
  extended by org.jbehave.core.ConfigurableEmbedder
      extended by net.thucydides.jbehave.ThucydidesJUnitStories
All Implemented Interfaces:
org.jbehave.core.Embeddable
Direct Known Subclasses:
ThucydidesJUnitStory

public class ThucydidesJUnitStories
extends org.jbehave.core.ConfigurableEmbedder

A JUnit-runnable test case designed to run a set of ThucydidesWebdriverIntegration-enabled JBehave stories in a given package. By default, it will look for *.story files on the classpath, and steps in or underneath the current package. You can redefine these constraints as follows:


Nested Class Summary
 class ThucydidesJUnitStories.ThucydidesConfigurationBuilder
           
 class ThucydidesJUnitStories.ThucydidesPropertySetter
           
 
Field Summary
static String DEFAULT_STORY_NAME
           
 
Constructor Summary
ThucydidesJUnitStories()
           
 
Method Summary
 org.jbehave.core.configuration.Configuration configuration()
           
 void findStoriesCalled(String storyName)
           
 void findStoriesIn(String storyFolder)
          Define the folder on the class path where the stories should be found
protected  String getRootPackage()
          The root package on the classpath containing the JBehave stories to be run.
protected  String getStoryPath()
          The root package on the classpath containing the JBehave stories to be run.
protected  Iterable<String> getStoryPathExpressions()
           
 net.thucydides.core.webdriver.Configuration getSystemConfiguration()
           
 void run()
           
 ThucydidesJUnitStories.ThucydidesConfigurationBuilder runThucydides()
           
 void setSystemConfiguration(net.thucydides.core.webdriver.Configuration systemConfiguration)
          Use this to override the default ThucydidesWebdriverIntegration configuration - for testing purposes only.
 org.jbehave.core.steps.InjectableStepsFactory stepsFactory()
           
protected  List<String> storyPaths()
           
protected  void useDriver(String driver)
           
 void useFormats(org.jbehave.core.reporters.Format... formats)
           
 
Methods inherited from class org.jbehave.core.ConfigurableEmbedder
addSteps, addSteps, candidateSteps, configuredEmbedder, useConfiguration, useEmbedder, useStepsFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_STORY_NAME

public static final String DEFAULT_STORY_NAME
See Also:
Constant Field Values
Constructor Detail

ThucydidesJUnitStories

public ThucydidesJUnitStories()
Method Detail

run

public void run()
         throws Throwable
Throws:
Throwable

configuration

public org.jbehave.core.configuration.Configuration configuration()
Overrides:
configuration in class org.jbehave.core.ConfigurableEmbedder

stepsFactory

public org.jbehave.core.steps.InjectableStepsFactory stepsFactory()
Overrides:
stepsFactory in class org.jbehave.core.ConfigurableEmbedder

storyPaths

protected List<String> storyPaths()

getRootPackage

protected String getRootPackage()
The root package on the classpath containing the JBehave stories to be run.


getStoryPathExpressions

protected Iterable<String> getStoryPathExpressions()

getStoryPath

protected String getStoryPath()
The root package on the classpath containing the JBehave stories to be run.


findStoriesIn

public void findStoriesIn(String storyFolder)
Define the folder on the class path where the stories should be found

Parameters:
storyFolder -

useFormats

public void useFormats(org.jbehave.core.reporters.Format... formats)

findStoriesCalled

public void findStoriesCalled(String storyName)

setSystemConfiguration

public void setSystemConfiguration(net.thucydides.core.webdriver.Configuration systemConfiguration)
Use this to override the default ThucydidesWebdriverIntegration configuration - for testing purposes only.


getSystemConfiguration

public net.thucydides.core.webdriver.Configuration getSystemConfiguration()

useDriver

protected void useDriver(String driver)

runThucydides

public ThucydidesJUnitStories.ThucydidesConfigurationBuilder runThucydides()


Copyright © 2011-2012 Wakaleo Consulting. All Rights Reserved.