Behaviour Driven Development, BDD, with Cucumber for Java

Cucumber has been around a long time in the Ruby world. It is a popular tool that allows development teams to describe how software should behave in plain text. The text is written in a business-readable domain-specific language and serves as documentation, automated test and development-aid - all rolled into one format. Cucumber-JVM has been available to the Java community a few years.


I will present BDD and discuss why you should use it, when you should use it and when you shouldn't use it.


After the why and when, it is time for the how. I will develop an example where we can see how a model will grow from the desired external behaviour. The developed model doesn't yet have a GUI. I will extend the example with a GUI without changing the wanted behaviour and test it using WebDriver.


Feature: Create plain text requirements that are executable

In order to create a common understanding of our system
As a developer, tester or business analyst
I want to to create examples that can be executed

Scenario: A system need to be developed to show BDD
Given a requirement
When we develop a model
Then we have a working system

Scenario: Add GUI to the system developed
Given a model
When we add a user interface
Then we will not need to change the specifications


I will finally show you how this can be fitted into your continuous integration/delivery system and thus be a crucial part of your automated acceptance test suite.

Lecture by

Lecture details

  • In English Presented in English
  • Tutorial