|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbehave.scenario.MostUsefulConfiguration
public class MostUsefulConfiguration
The default configuration used by ScenarioRunner. Works for most
situations that users are likely to encounter. The default elements
configured are:
StepCreator: new UnmatchedToPendingStepCreator()ScenarioDefiner: new ClasspathScenarioDefiner(new PatternScenarioParser(this))ErrorStrategy: ErrorStrategy.RETHROWPendingErrorStrategy: PendingErrorStrategy.PASSINGScenarioReporter: new PassSilentlyDecorator(new PrintStreamScenarioReporter())KeyWords: new I18nKeyWords()StepdocGenerator: new DefaultStepdocGenerator()StepdocReporter: new PrintStreamStepdocReporter(true)
| Constructor Summary | |
|---|---|
MostUsefulConfiguration()
|
|
| Method Summary | |
|---|---|
StepCreator |
forCreatingSteps()
Provides pending steps where unmatched steps exist. |
ScenarioDefiner |
forDefiningScenarios()
Defines scenarios by looking for a file named after the scenario and in the same package, using lower-case underscored name in place of the camel-cased name - so MyScenario.java maps to my_scenario. |
StepdocGenerator |
forGeneratingStepdoc()
Generates stepdocs |
ErrorStrategy |
forHandlingErrors()
Handles errors by rethrowing them. |
PendingErrorStrategy |
forPendingSteps()
Allows pending steps to pass, so that builds etc. |
ScenarioReporter |
forReportingScenarios()
Reports failing or pending scenarios to System.out, while silently passing scenarios. |
StepdocReporter |
forReportingStepdoc()
Reports stepdocs to System.out |
KeyWords |
keywords()
Provides the keywords in English |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MostUsefulConfiguration()
| Method Detail |
|---|
public StepCreator forCreatingSteps()
forCreatingSteps in interface Configurationpublic ScenarioDefiner forDefiningScenarios()
forDefiningScenarios in interface Configurationpublic ErrorStrategy forHandlingErrors()
If there are multiple scenarios in a single story definition, this could cause the story to stop after the first failing scenario.
If you want different behaviour, you might want to look at the
ErrorStrategyInWhichWeTrustTheReporter.
forHandlingErrors in interface Configurationpublic PendingErrorStrategy forPendingSteps()
If you want to spot pending steps, you might want to look at
PendingStepStrategy.FAILING, or alternatively at the
PropertyBasedConfiguration which provides a mechanism for altering this
behaviour in different environments.
forPendingSteps in interface Configurationpublic ScenarioReporter forReportingScenarios()
If you want different behaviour, you might like to use the
PrintStreamScenarioReporter, or look at the PropertyBasedConfiguration
which provides a mechanism for altering this behaviour in different
environments.
forReportingScenarios in interface Configurationpublic KeyWords keywords()
keywords in interface Configurationpublic StepdocGenerator forGeneratingStepdoc()
forGeneratingStepdoc in interface Configurationpublic StepdocReporter forReportingStepdoc()
System.out
forReportingStepdoc in interface Configuration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||