Package org.jbehave.core.configuration
Class Configuration
- java.lang.Object
-
- org.jbehave.core.configuration.Configuration
-
- Direct Known Subclasses:
MostUsefulConfiguration
,UnmodifiableConfiguration
public abstract class Configuration extends Object
Provides the configuration used by the
Embedder
and the in theEmbeddable
implementations to customise its runtime properties.Configuration implements a Builder pattern so that each element of the configuration can be specified individually, and read well. All elements have default values, which can be overridden by the "use" methods. The "use" methods allow to override the dependencies one by one and play nicer with a Java hierarchical structure, in that does allow the use of non-static member variables.
-
-
Field Summary
Fields Modifier and Type Field Description protected AliasParser
aliasParser
Parse aliases from resourcesprotected Set<String>
aliasPaths
Paths to resources containing ailas definitionsprotected CompositeParser
compositeParser
Parses composite steps from their textual representationprotected Set<String>
compositePaths
Paths to resources containing composite steps definitionsprotected StoryReporter
defaultStoryReporter
Reports stories to console outputprotected ExamplesTableFactory
examplesTableFactory
The examples table factoryprotected FailureStrategy
failureStrategy
Handles errors by re-throwing them.protected Keywords
keywords
Use English language for keywordsprotected ParameterControls
parameterControls
Controls of step parameterizationprotected ParameterConverters
parameterConverters
Use default built-in parameter convertersprotected com.thoughtworks.paranamer.Paranamer
paranamer
Paranamer is switched off by defaultprotected PathCalculator
pathCalculator
Use an absolute path calculatorprotected PendingStepStrategy
pendingStepStrategy
Allows pending steps to pass, so that steps that to do not match any method will not cause failure.protected StepCollector
stepCollector
Provides pending steps where unmatched steps exist.protected StepConditionMatcher
stepConditionMatcher
The step condition matcher to match conditional stepsprotected StepdocReporter
stepdocReporter
Report candidate steps found to a PrintStreamprotected StepFinder
stepFinder
Finder of matching candidate stepsprotected StepMonitor
stepMonitor
Silent monitoring that does not produce any noise of the step matching.protected StepPatternParser
stepPatternParser
Pattern build that uses prefix for identifying parametersprotected StepsContext
stepsContext
The steps contextprotected StoryControls
storyControls
Use default story controlsprotected Comparator<Story>
storyExecutionComparator
The story execution comparatorprotected StoryLoader
storyLoader
Loads story content from classpathprotected StoryParser
storyParser
Parses the textual representation via pattern matching of keywordsprotected StoryPathResolver
storyPathResolver
Resolves story paths from class names using underscored camel case with ".story" extensionprotected StoryReporterBuilder
storyReporterBuilder
The story reporter builderprotected TableParsers
tableParsers
Use default built-in ExamplesTable parsersprotected TableTransformerMonitor
tableTransformerMonitor
Monitor events of example table transformersprotected TableTransformers
tableTransformers
Use default built-in ExamplesTable transformersprotected ViewGenerator
viewGenerator
Use Freemarker-based view generator
-
Constructor Summary
Constructors Constructor Description Configuration()
-
Method Summary
-
-
-
Field Detail
-
storyControls
protected StoryControls storyControls
Use default story controls
-
keywords
protected Keywords keywords
Use English language for keywords
-
stepCollector
protected StepCollector stepCollector
Provides pending steps where unmatched steps exist.
-
storyParser
protected StoryParser storyParser
Parses the textual representation via pattern matching of keywords
-
compositeParser
protected CompositeParser compositeParser
Parses composite steps from their textual representation
-
storyLoader
protected StoryLoader storyLoader
Loads story content from classpath
-
aliasParser
protected AliasParser aliasParser
Parse aliases from resources
-
storyPathResolver
protected StoryPathResolver storyPathResolver
Resolves story paths from class names using underscored camel case with ".story" extension
-
failureStrategy
protected FailureStrategy failureStrategy
Handles errors by re-throwing them. If there are multiple scenarios in a single story, this could cause the story to stop after the first failing scenario. Users wanting a different behaviour may useSilentlyAbsorbingFailure
.
-
pendingStepStrategy
protected PendingStepStrategy pendingStepStrategy
Allows pending steps to pass, so that steps that to do not match any method will not cause failure. Uses wanting a stricter behaviour for pending steps may useFailingUponPendingStep
.
-
defaultStoryReporter
protected StoryReporter defaultStoryReporter
Reports stories to console output
-
storyReporterBuilder
protected StoryReporterBuilder storyReporterBuilder
The story reporter builder
-
stepsContext
protected StepsContext stepsContext
The steps context
-
stepFinder
protected StepFinder stepFinder
Finder of matching candidate steps
-
stepdocReporter
protected StepdocReporter stepdocReporter
Report candidate steps found to a PrintStream
-
stepPatternParser
protected StepPatternParser stepPatternParser
Pattern build that uses prefix for identifying parameters
-
parameterControls
protected ParameterControls parameterControls
Controls of step parameterization
-
stepMonitor
protected StepMonitor stepMonitor
Silent monitoring that does not produce any noise of the step matching. If needed, users can switch on verbose monitoring usingPrintStreamStepMonitor
-
paranamer
protected com.thoughtworks.paranamer.Paranamer paranamer
Paranamer is switched off by default
-
parameterConverters
protected ParameterConverters parameterConverters
Use default built-in parameter converters
-
tableParsers
protected TableParsers tableParsers
Use default built-in ExamplesTable parsers
-
tableTransformers
protected TableTransformers tableTransformers
Use default built-in ExamplesTable transformers
-
viewGenerator
protected ViewGenerator viewGenerator
Use Freemarker-based view generator
-
pathCalculator
protected PathCalculator pathCalculator
Use an absolute path calculator
-
compositePaths
protected Set<String> compositePaths
Paths to resources containing composite steps definitions
-
examplesTableFactory
protected ExamplesTableFactory examplesTableFactory
The examples table factory
-
storyExecutionComparator
protected Comparator<Story> storyExecutionComparator
The story execution comparator
-
stepConditionMatcher
protected StepConditionMatcher stepConditionMatcher
The step condition matcher to match conditional steps
-
tableTransformerMonitor
protected TableTransformerMonitor tableTransformerMonitor
Monitor events of example table transformers
-
-
Method Detail
-
keywords
public Keywords keywords()
-
dryRun
public boolean dryRun()
-
storyControls
public StoryControls storyControls()
-
storyParser
public StoryParser storyParser()
-
compositeParser
public CompositeParser compositeParser()
-
storyLoader
public StoryLoader storyLoader()
-
aliasParser
public AliasParser aliasParser()
-
storyExecutionComparator
public Comparator<Story> storyExecutionComparator()
-
examplesTableFactory
public ExamplesTableFactory examplesTableFactory()
-
storyPathResolver
public StoryPathResolver storyPathResolver()
-
failureStrategy
public FailureStrategy failureStrategy()
-
pendingStepStrategy
public PendingStepStrategy pendingStepStrategy()
-
defaultStoryReporter
public StoryReporter defaultStoryReporter()
-
storyReporter
public StoryReporter storyReporter(String storyPath)
-
storyReporterBuilder
public StoryReporterBuilder storyReporterBuilder()
-
stepsContext
public StepsContext stepsContext()
-
stepCollector
public StepCollector stepCollector()
-
stepFinder
public StepFinder stepFinder()
-
stepdocReporter
public StepdocReporter stepdocReporter()
-
stepPatternParser
public StepPatternParser stepPatternParser()
-
parameterControls
public ParameterControls parameterControls()
-
stepMonitor
public StepMonitor stepMonitor()
-
paranamer
public com.thoughtworks.paranamer.Paranamer paranamer()
-
parameterConverters
public ParameterConverters parameterConverters()
-
tableParsers
public TableParsers tableParsers()
-
tableTransformers
public TableTransformers tableTransformers()
-
viewGenerator
public ViewGenerator viewGenerator()
-
pathCalculator
public PathCalculator pathCalculator()
-
stepConditionMatcher
public StepConditionMatcher stepConditionMatcher()
-
tableTransformerMonitor
public TableTransformerMonitor tableTransformerMonitor()
-
useStepConditionMatcher
public Configuration useStepConditionMatcher(StepConditionMatcher stepConditionMatcher)
-
useKeywords
public Configuration useKeywords(Keywords keywords)
-
doDryRun
public Configuration doDryRun(Boolean dryRun)
-
useStoryControls
public Configuration useStoryControls(StoryControls storyControls)
-
usePendingStepStrategy
public Configuration usePendingStepStrategy(PendingStepStrategy pendingStepStrategy)
-
useFailureStrategy
public Configuration useFailureStrategy(FailureStrategy failureStrategy)
-
useStoryParser
public Configuration useStoryParser(StoryParser storyParser)
-
useCompositeParser
public Configuration useCompositeParser(CompositeParser compositeParser)
-
useStoryLoader
public Configuration useStoryLoader(StoryLoader storyLoader)
-
useAliasParser
public Configuration useAliasParser(AliasParser aliasParser)
-
useExamplesTableFactory
public Configuration useExamplesTableFactory(ExamplesTableFactory examplesTableFactory)
-
useStoryExecutionComparator
public Configuration useStoryExecutionComparator(Comparator<Story> storyExecutionComparator)
-
useStoryPathResolver
public Configuration useStoryPathResolver(StoryPathResolver storyPathResolver)
-
useDefaultStoryReporter
public Configuration useDefaultStoryReporter(StoryReporter storyReporter)
-
useStoryReporterBuilder
public Configuration useStoryReporterBuilder(StoryReporterBuilder storyReporterBuilder)
-
useStepCollector
public Configuration useStepCollector(StepCollector stepCollector)
-
useStepFinder
public Configuration useStepFinder(StepFinder stepFinder)
-
useStepdocReporter
public Configuration useStepdocReporter(StepdocReporter stepdocReporter)
-
useStepPatternParser
public Configuration useStepPatternParser(StepPatternParser stepPatternParser)
-
useParameterControls
public Configuration useParameterControls(ParameterControls parameterControls)
-
useStepMonitor
public Configuration useStepMonitor(StepMonitor stepMonitor)
-
useParanamer
public Configuration useParanamer(com.thoughtworks.paranamer.Paranamer paranamer)
-
useParameterConverters
public Configuration useParameterConverters(ParameterConverters parameterConverters)
-
useTableTransformers
public Configuration useTableTransformers(TableTransformers tableTransformers)
-
useViewGenerator
public Configuration useViewGenerator(ViewGenerator viewGenerator)
-
usePathCalculator
public Configuration usePathCalculator(PathCalculator pathCalculator)
-
useCompositePaths
public Configuration useCompositePaths(Set<String> compositePaths)
-
useAliasPaths
public Configuration useAliasPaths(Set<String> aliasPaths)
-
isParallelStoryExamplesEnabled
public boolean isParallelStoryExamplesEnabled()
-
setParallelStoryExamplesEnabled
public void setParallelStoryExamplesEnabled(boolean parallelStoryExamplesEnabled)
-
useStepsContext
public Configuration useStepsContext(StepsContext stepsContext)
-
useTableTransformerMonitor
public Configuration useTableTransformerMonitor(TableTransformerMonitor tableTransformerMonitor)
-
-