Writing Steps in Groovy

Groovy is a very powerful dynamic scripting language that compiles directly to the JVM.

JBehave supports writing Steps classes directly in Groovy, using the GroovyStepsFactory and providing the list of Groovy scripts as classpath resources:

The Groovy script needs to include annotated methods, just as you would in Java:

Using Annotations