org.jbehave.scenario
Class Scenario

java.lang.Object
  extended by org.jbehave.scenario.Scenario

public abstract class Scenario
extends java.lang.Object

Extend this class to run your scenario. Call the class after your scenario, eg: "ICanLogin.java".

The Scenario should be in a matching text file in the same place, eg: "i_can_login". The scenario name used can be configured via the ScenarioNameResolver.

Write some steps in your text scenario, starting each new step with Given, When, Then or And. The keywords can be configured via the KeyWords class, eg they can be translated/localized to other languages.

Then move on to extending the Steps class.


Constructor Summary
Scenario(Configuration configuration, Steps... candidateSteps)
           
Scenario(ScenarioRunner scenarioRunner, Configuration configuration, Steps... candidateSteps)
           
Scenario(Steps... candidateSteps)
           
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scenario

public Scenario(Steps... candidateSteps)

Scenario

public Scenario(Configuration configuration,
                Steps... candidateSteps)

Scenario

public Scenario(ScenarioRunner scenarioRunner,
                Configuration configuration,
                Steps... candidateSteps)
Method Detail

run

public void run()
         throws java.lang.Throwable
Throws:
java.lang.Throwable


Copyright © 2003-2008. All Rights Reserved.