Package org.jbehave.core.embedder
Class PerformableTree
- java.lang.Object
-
- org.jbehave.core.embedder.PerformableTree
-
public class PerformableTree extends Object
Creates a tree ofPerformableTree.Performableobjects for a set of stories, grouping sets of performable steps for each story and scenario, and adding before and after stories steps. The process has two phases:- The tree is populated with groups of performable steps when the stories
are added via the
addStories(RunContext, List)method. - The performable steps are then populated with the results when the
performBeforeOrAfterStories(RunContext, Stage)andperform(RunContext, Story)methods are executed.
PerformableTree.RunContextfor the set of stories being run but the individual stories can be performed concurrently. - The tree is populated with groups of performable steps when the stories
are added via the
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPerformableTree.AbstractPerformableScenariostatic classPerformableTree.ExamplePerformableScenariostatic classPerformableTree.FailureContextstatic classPerformableTree.NormalPerformableScenariostatic interfacePerformableTree.Performablestatic classPerformableTree.PerformableEntitystatic classPerformableTree.PerformableGivenStoriesstatic classPerformableTree.PerformableRootstatic classPerformableTree.PerformableScenariostatic classPerformableTree.PerformableStepsstatic classPerformableTree.PerformableStorystatic interfacePerformableTree.ReportingFailuresstatic classPerformableTree.RunContextThe context for running a story.static interfacePerformableTree.Statestatic classPerformableTree.Status
-
Constructor Summary
Constructors Constructor Description PerformableTree()
-
Method Summary
Modifier and Type Method Description voidaddStories(PerformableTree.RunContext context, List<Story> stories)PerformableTree.PerformableRootgetRoot()PerformableTree.RunContextnewRunContext(Configuration configuration, AllStepCandidates allStepCandidates, EmbedderMonitor embedderMonitor, MetaFilter filter, BatchFailures failures)voidperform(PerformableTree.RunContext context, Story story)voidperformBeforeOrAfterStories(PerformableTree.RunContext context, StepCollector.Stage stage)StorystoryOfPath(Configuration configuration, String storyPath)Returns the parsed story from the given pathStorystoryOfText(Configuration configuration, String storyAsText, String storyId)Returns the parsed story from the given textStringtoString()
-
-
-
Method Detail
-
getRoot
public PerformableTree.PerformableRoot getRoot()
-
addStories
public void addStories(PerformableTree.RunContext context, List<Story> stories)
-
storyOfPath
public Story storyOfPath(Configuration configuration, String storyPath)
Returns the parsed story from the given path- Parameters:
configuration- the Configuration used to run storystoryPath- the story path- Returns:
- The parsed Story
-
storyOfText
public Story storyOfText(Configuration configuration, String storyAsText, String storyId)
Returns the parsed story from the given text- Parameters:
configuration- the Configuration used to run storystoryAsText- the story textstoryId- the story Id, which will be returned as story path- Returns:
- The parsed Story
-
perform
public void perform(PerformableTree.RunContext context, Story story)
-
performBeforeOrAfterStories
public void performBeforeOrAfterStories(PerformableTree.RunContext context, StepCollector.Stage stage)
-
newRunContext
public PerformableTree.RunContext newRunContext(Configuration configuration, AllStepCandidates allStepCandidates, EmbedderMonitor embedderMonitor, MetaFilter filter, BatchFailures failures)
-
-