A simple example
Liz should be asked to guess again when she guesses “joke”
This example is from a word guessing game. It’s illustrating a rule stipulating that a guess must be 5 letters.
Behaviour-Driven Development (BDD) is a set of practices that aim to reduce some common wasteful activities in software development:
BDD aims to narrow the communication gaps between team members, foster better understanding of the customer and promote continuous communication with real world examples.
Examples describe how the software is intended to behave, often illustrating a particular business rule or requirement.
BDD can be split in two parts - Deliberate Discovery and Test-Driven Development.
There are many reasons why software projects go wrong. A very common reason is that different people in the organisation or on the team have very different understandings of how the software should behave, and what problems it’s trying to solve.
Ignorance is the single greatest impediment to throughput. - Dan North
Teams that deliberately seek to discover what they are ignorant about before development starts are more productive, because there is less rework.
The most effective way to do this is through conversation and collaboration between key stakeholders, such as:
The Cucumber way to do this is Example Mapping, a simple technique for coming up with examples together.
When people in different roles have conversations about concrete examples they will often discover a lot about the problem domain.
The examples they produce together can then become automated tests and living documentation of how the system behaves.
Test-Driven Development (TDD) is a software development technique where automated tests are written before the code. Developers use those tests to drive the development.
TDD can be practiced at different levels of granularity, from acceptance tests to unit tests. The BDD flavour of TDD uses natural language to describe tests. They can be understood by non-programmers and are often based on examples created collaboratively using Example Mapping.
Gherkin is a simple syntax for such natural language tests, and Cucumber is the tool that can execute them.
You can help us improve this documentation. Edit this page.