public class StoryRunner extends 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) |
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,
List<CandidateSteps> candidateSteps,
Story story)
Runs a Story with the given configuration and steps.
|
void |
run(Configuration configuration,
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,
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,
List<CandidateSteps> candidateSteps,
StepCollector.Stage stage)
Run steps before or after a collection of stories.
|
Story |
storyOfPath(Configuration configuration,
String storyPath)
Returns the parsed story from the given path
|
Story |
storyOfText(Configuration configuration,
String storyAsText,
String storyId)
Returns the parsed story from the given text
|
String |
toString() |
public StoryRunner.State runBeforeOrAfterStories(Configuration configuration, 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, List<CandidateSteps> candidateSteps, Story story) throws Throwable
configuration
- the Configuration used to run storycandidateSteps
- the List of CandidateSteps containing the candidate
steps methodsstory
- the Story to runThrowable
- if failures occurred and FailureStrategy dictates it to
be re-thrown.public void run(Configuration configuration, List<CandidateSteps> candidateSteps, Story story, MetaFilter filter) throws 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 MetaThrowable
- if failures occurred and FailureStrategy dictates it to
be re-thrown.public void run(Configuration configuration, List<CandidateSteps> candidateSteps, Story story, MetaFilter filter, StoryRunner.State beforeStories) throws 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
null
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 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
null
Throwable
- if failures occurred and FailureStrategy dictates it to
be re-thrown.public Story storyOfPath(Configuration configuration, String storyPath)
configuration
- the Configuration used to run storystoryPath
- the story pathpublic Story storyOfText(Configuration configuration, String storyAsText, 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 boolean failed(StoryRunner.State state)
public Throwable failure(StoryRunner.State state)
Copyright © 2003–2015. All rights reserved.