public class StoryRunner
extends java.lang.Object
Story, given a Configuration and a list of
CandidateSteps, describing the results to the StoryReporter.| Modifier and Type | Class and Description |
|---|---|
static interface |
StoryRunner.State |
| Constructor and Description |
|---|
StoryRunner() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelStory(Story story,
StoryDuration storyDuration)
Cancels story execution following a timeout
|
boolean |
failed(StoryRunner.State state) |
java.lang.Throwable |
failure(StoryRunner.State state) |
void |
run(Configuration configuration,
InjectableStepsFactory stepsFactory,
Story story,
MetaFilter filter,
StoryRunner.State beforeStories)
Runs a Story with the given steps factory, applying the given meta
filter, and staring from given state.
|
void |
run(Configuration configuration,
java.util.List<CandidateSteps> candidateSteps,
Story story)
Runs a Story with the given configuration and steps.
|
void |
run(Configuration configuration,
java.util.List<CandidateSteps> candidateSteps,
Story story,
MetaFilter filter)
Runs a Story with the given configuration and steps, applying the given
meta filter.
|
void |
run(Configuration configuration,
java.util.List<CandidateSteps> candidateSteps,
Story story,
MetaFilter filter,
StoryRunner.State beforeStories)
Runs a Story with the given configuration and steps, applying the given
meta filter, and staring from given state.
|
StoryRunner.State |
runBeforeOrAfterStories(Configuration configuration,
java.util.List<CandidateSteps> candidateSteps,
StepCollector.Stage stage)
Run steps before or after a collection of stories.
|
Story |
storyOfPath(Configuration configuration,
java.lang.String storyPath)
Returns the parsed story from the given path
|
Story |
storyOfText(Configuration configuration,
java.lang.String storyAsText,
java.lang.String storyId)
Returns the parsed story from the given text
|
java.lang.String |
toString() |
public StoryRunner.State runBeforeOrAfterStories(Configuration configuration, java.util.List<CandidateSteps> candidateSteps, StepCollector.Stage stage)
configuration - the Configuration used to find the steps to runcandidateSteps - the List of CandidateSteps containing the candidate
steps methodsstage - the Stagepublic void run(Configuration configuration, java.util.List<CandidateSteps> candidateSteps, Story story) throws java.lang.Throwable
configuration - the Configuration used to run storycandidateSteps - the List of CandidateSteps containing the candidate
steps methodsstory - the Story to runjava.lang.Throwable - if failures occurred and FailureStrategy dictates it to
be re-thrown.public void run(Configuration configuration, java.util.List<CandidateSteps> candidateSteps, Story story, MetaFilter filter) throws java.lang.Throwable
configuration - the Configuration used to run storycandidateSteps - the List of CandidateSteps containing the candidate
steps methodsstory - the Story to runfilter - the Filter to apply to the story Metajava.lang.Throwable - if failures occurred and FailureStrategy dictates it to
be re-thrown.public void run(Configuration configuration, java.util.List<CandidateSteps> candidateSteps, Story story, MetaFilter filter, StoryRunner.State beforeStories) throws java.lang.Throwable
configuration - the Configuration used to run storycandidateSteps - the List of CandidateSteps containing the candidate
steps methodsstory - the Story to runfilter - the Filter to apply to the story MetabeforeStories - the State before running any of the stories, if not
nulljava.lang.Throwable - if failures occurred and FailureStrategy dictates it to
be re-thrown.public void run(Configuration configuration, InjectableStepsFactory stepsFactory, Story story, MetaFilter filter, StoryRunner.State beforeStories) throws java.lang.Throwable
configuration - the Configuration used to run storystepsFactory - the InjectableStepsFactory used to created the
candidate steps methodsstory - the Story to runfilter - the Filter to apply to the story MetabeforeStories - the State before running any of the stories, if not
nulljava.lang.Throwable - if failures occurred and FailureStrategy dictates it to
be re-thrown.public Story storyOfPath(Configuration configuration, java.lang.String storyPath)
configuration - the Configuration used to run storystoryPath - the story pathpublic Story storyOfText(Configuration configuration, java.lang.String storyAsText, java.lang.String storyId)
configuration - the Configuration used to run storystoryAsText - the story textstoryId - the story Id, which will be returned as story pathpublic void cancelStory(Story story, StoryDuration storyDuration)
story - the Story that was timed outstoryDuration - the StoryDurationpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean failed(StoryRunner.State state)
public java.lang.Throwable failure(StoryRunner.State state)
Copyright © 2003-2014. All Rights Reserved.