Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.
aslakhellesoy edited this page May 25, 2011 · 2 revisions

Cuke4Duke supports Before and After hooks that will be invoked before and after your scenarios. You can read more about them in the Cucumber page on Hooks.

The examples below use tags – just to show you the syntax. You can also define hooks without tags.

Java

@Before({"@important,@slow", "@fast"})
public void doSomething() {}

@Before("@no-curlies")
public void doSstuff() {}

Ordering

If you want to control the order in which hooks are run, just add annotate those hooks with the order number you want, for example @Order(1).

Scala

Before("@important,@slow", "@fast") {}

Groovy

Before("@important,@slow", "@fast") {}

Clojure

(Before
())

Tags are not yet supported

Ioke

Hooks are not yet supported

Javascript

Hooks are not yet supported

Clone this wiki locally