Package org.jbehave.core.configuration
Class Configuration
java.lang.Object
org.jbehave.core.configuration.Configuration
- Direct Known Subclasses:
MostUsefulConfiguration,UnmodifiableConfiguration
Provides the configuration used by the Embedder and the in the
Embeddable 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
FieldsModifier and TypeFieldDescriptionprotected AliasParserParse aliases from resourcesPaths to resources containing ailas definitionsprotected CompositeParserParses composite steps from their textual representationPaths to resources containing composite steps definitionsprotected StoryReporterReports stories to console outputprotected ExamplesTableFactoryThe examples table factoryprotected ExpressionResolverUse default built-in expression resolverprotected FailureStrategyHandles errors by re-throwing them.protected KeywordsUse English language for keywordsprotected ParameterControlsControls of step parameterizationprotected ParameterConvertersUse default built-in parameter convertersprotected com.thoughtworks.paranamer.ParanamerParanamer is switched off by defaultprotected PathCalculatorUse an absolute path calculatorprotected PendingStepStrategyAllows pending steps to pass, so that steps that to do not match any method will not cause failure.protected StepCollectorProvides pending steps where unmatched steps exist.protected StepConditionMatcherThe step condition matcher to match conditional stepsprotected StepdocReporterReport candidate steps found to a PrintStreamprotected StepFinderFinder of matching candidate stepsprotected StepMonitorSilent monitoring that does not produce any noise of the step matching.protected StepPatternParserPattern build that uses prefix for identifying parametersprotected StepsContextThe steps contextprotected StoryControlsUse default story controlsprotected Comparator<Story>The story execution comparatorprotected StoryLoaderLoads story content from classpathprotected StoryParserParses the textual representation via pattern matching of keywordsprotected StoryPathResolverResolves story paths from class names using underscored camel case with ".story" extensionprotected StoryReporterBuilderThe story reporter builderprotected TableParsersUse default built-in ExamplesTable parsersprotected TableTransformerMonitorMonitor events of example table transformersprotected TableTransformersUse default built-in ExamplesTable transformersprotected ViewGeneratorUse Freemarker-based view generator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandryRun()booleankeywords()com.thoughtworks.paranamer.ParanamervoidsetParallelStoryExamplesEnabled(boolean parallelStoryExamplesEnabled) storyReporter(String storyPath) useAliasParser(AliasParser aliasParser) useAliasPaths(Set<String> aliasPaths) useCompositeParser(CompositeParser compositeParser) useCompositePaths(Set<String> compositePaths) useDefaultStoryReporter(StoryReporter storyReporter) useExamplesTableFactory(ExamplesTableFactory examplesTableFactory) useExpressionResolver(ExpressionResolver expressionResolver) useFailureStrategy(FailureStrategy failureStrategy) useKeywords(Keywords keywords) useParameterControls(ParameterControls parameterControls) useParameterConverters(ParameterConverters parameterConverters) useParanamer(com.thoughtworks.paranamer.Paranamer paranamer) usePathCalculator(PathCalculator pathCalculator) usePendingStepStrategy(PendingStepStrategy pendingStepStrategy) useStepCollector(StepCollector stepCollector) useStepConditionMatcher(StepConditionMatcher stepConditionMatcher) useStepdocReporter(StepdocReporter stepdocReporter) useStepFinder(StepFinder stepFinder) useStepMonitor(StepMonitor stepMonitor) useStepPatternParser(StepPatternParser stepPatternParser) useStepsContext(StepsContext stepsContext) useStoryControls(StoryControls storyControls) useStoryExecutionComparator(Comparator<Story> storyExecutionComparator) useStoryLoader(StoryLoader storyLoader) useStoryParser(StoryParser storyParser) useStoryPathResolver(StoryPathResolver storyPathResolver) useStoryReporterBuilder(StoryReporterBuilder storyReporterBuilder) useTableTransformerMonitor(TableTransformerMonitor tableTransformerMonitor) useTableTransformers(TableTransformers tableTransformers) useViewGenerator(ViewGenerator viewGenerator)
-
Field Details
-
storyControls
Use default story controls -
keywords
Use English language for keywords -
stepCollector
Provides pending steps where unmatched steps exist. -
storyParser
Parses the textual representation via pattern matching of keywords -
compositeParser
Parses composite steps from their textual representation -
storyLoader
Loads story content from classpath -
aliasParser
Parse aliases from resources -
storyPathResolver
Resolves story paths from class names using underscored camel case with ".story" extension -
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
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
Reports stories to console output -
storyReporterBuilder
The story reporter builder -
stepsContext
The steps context -
stepFinder
Finder of matching candidate steps -
stepdocReporter
Report candidate steps found to a PrintStream -
stepPatternParser
Pattern build that uses prefix for identifying parameters -
parameterControls
Controls of step parameterization -
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 paranamerParanamer is switched off by default -
parameterConverters
Use default built-in parameter converters -
expressionResolver
Use default built-in expression resolver -
tableParsers
Use default built-in ExamplesTable parsers -
tableTransformers
Use default built-in ExamplesTable transformers -
viewGenerator
Use Freemarker-based view generator -
pathCalculator
Use an absolute path calculator -
compositePaths
Paths to resources containing composite steps definitions -
aliasPaths
Paths to resources containing ailas definitions -
examplesTableFactory
The examples table factory -
storyExecutionComparator
The story execution comparator -
stepConditionMatcher
The step condition matcher to match conditional steps -
tableTransformerMonitor
Monitor events of example table transformers
-
-
Constructor Details
-
Configuration
public Configuration()
-
-
Method Details
-
keywords
-
dryRun
public boolean dryRun() -
storyControls
-
storyParser
-
compositeParser
-
storyLoader
-
aliasParser
-
storyExecutionComparator
-
examplesTableFactory
-
storyPathResolver
-
failureStrategy
-
pendingStepStrategy
-
defaultStoryReporter
-
storyReporter
-
storyReporterBuilder
-
stepsContext
-
stepCollector
-
stepFinder
-
stepdocReporter
-
stepPatternParser
-
parameterControls
-
stepMonitor
-
paranamer
public com.thoughtworks.paranamer.Paranamer paranamer() -
parameterConverters
-
expressionResolver
-
tableParsers
-
tableTransformers
-
viewGenerator
-
pathCalculator
-
compositePaths
-
aliasPaths
-
stepConditionMatcher
-
tableTransformerMonitor
-
useStepConditionMatcher
-
useKeywords
-
doDryRun
-
useStoryControls
-
usePendingStepStrategy
-
useFailureStrategy
-
useStoryParser
-
useCompositeParser
-
useStoryLoader
-
useAliasParser
-
useExamplesTableFactory
-
useStoryExecutionComparator
-
useStoryPathResolver
-
useDefaultStoryReporter
-
useStoryReporterBuilder
-
useStepCollector
-
useStepFinder
-
useStepdocReporter
-
useStepPatternParser
-
useParameterControls
-
useStepMonitor
-
useParanamer
-
useParameterConverters
-
useExpressionResolver
-
useTableTransformers
-
useViewGenerator
-
usePathCalculator
-
useCompositePaths
-
useAliasPaths
-
isParallelStoryExamplesEnabled
public boolean isParallelStoryExamplesEnabled() -
setParallelStoryExamplesEnabled
public void setParallelStoryExamplesEnabled(boolean parallelStoryExamplesEnabled) -
useStepsContext
-
useTableTransformerMonitor
-