org.jbehave.core.embedder
Class StoryRunner

java.lang.Object
  extended by org.jbehave.core.embedder.StoryRunner

public class StoryRunner
extends Object

Runs a Story, given a Configuration and a list of CandidateSteps, describing the results to the StoryReporter.

Author:
Elizabeth Keogh, Mauro Talevi, Paul Hammant

Constructor Summary
StoryRunner()
           
 
Method Summary
 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 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
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StoryRunner

public StoryRunner()
Method Detail

runBeforeOrAfterStories

public void runBeforeOrAfterStories(Configuration configuration,
                                    List<CandidateSteps> candidateSteps,
                                    StepCollector.Stage stage)
Run steps before or after a collection of stories. Steps are execute only once per collection of stories.

Parameters:
configuration - the Configuration used to find the steps to run
candidateSteps - the List of CandidateSteps containing the candidate steps methods
stage - the Stage

run

public void run(Configuration configuration,
                List<CandidateSteps> candidateSteps,
                Story story)
         throws Throwable
Runs a Story with the given configuration and steps.

Parameters:
configuration - the Configuration used to run story
candidateSteps - the List of CandidateSteps containing the candidate steps methods
story - the Story to run
Throws:
Throwable - if failures occurred and FailureStrategy dictates it to be re-thrown.

run

public void run(Configuration configuration,
                List<CandidateSteps> candidateSteps,
                Story story,
                MetaFilter filter)
         throws Throwable
Runs a Story with the given configuration and steps, applying the given meta filter.

Parameters:
configuration - the Configuration used to run story
candidateSteps - the List of CandidateSteps containing the candidate steps methods
story - the Story to run
filter - the Filter to apply to the story Meta
Throws:
Throwable - if failures occurred and FailureStrategy dictates it to be re-thrown.

storyOfPath

public Story storyOfPath(Configuration configuration,
                         String storyPath)
Returns the parsed story from the given path

Parameters:
configuration - the Configuration used to run story
storyPath - the story path
Returns:
The parsed Story

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003-2011. All Rights Reserved.