Behaviour Driven Development — 1/3 — Overview

A Scenario Example
  • Given : it’s the arrangement of context state — the starting state
  • When : it’s the event, a trigger or when a user does something
  • Then : it’s the outcome with the expected results

Reader’s guide

What is BDD ?

The BDD approach

Tres Amigos

  • Business
  • Development
  • Testing

Example Mapping

Writing scenarios BRIEFE-ly

  • Business vocabulary : use the agreed vocabulary among the tres amigos. That means anyone can understand. Avoid using terms that others can’t understand.
  • Real data — concret : use real data when explaining something, they serve as examples to represent the idea we want to tell.
  • Intention : A sample must have only reason to exist. Name it with intention.
  • Essential : A sample must help to understand the behaviour described in the scenario. If it does not, it’s useless.
  • Focus : There is only one interaction within a scenario.
  • Empathy : Samples describe what the user is trying to do, rather than what he does. This helps to understand and maintain. Describe the behaviour rather than prescribing actions. This aims to build empathy for a better user experience.



  • Behaviour Tests tend to be a bit slower to run than unit tests
  • When they fail, they only indicate that something went wrong, but may give little or no indication of the root cause

The Pitfalls

  • One thing to avoid, because it is usually misunderstood, is to limiting three amigo discussions to only three people. The three perspectives are about roles, not about people. If there are other stakeholders who are relevant to a particular increment of work, include them in the discussion.
  • Also avoid expanding the three amigos discussions to the team. The intent of this practice is to include each necessary perspective with as small a group as possible. The smaller it is, the more efficient it is.




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kong To

Kong To

Developer, Coder or Craftsman, but code quality matters. Technical writer @wesquad @wemanity