|
||||||||||
| 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 for JBehave's scenario runner. Works for most things that users want to do.
| 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 and underscores in place of the camel-cased name - so MyScenario.java maps to my_scenario. |
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. |
KeyWords |
keywords()
Provides the keywords Scenario, Given, When, Then and And. |
| 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 Configuration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||