Behaviour-driven development

Hand-drawn row of six three-step terracotta staircases over flowing cream, linen, sand and umber contour lines with moss bands.

Behaviour-driven development (BDD) is an agile practice in which a team writes requirements as short plain-language scenarios of the form Given, When, Then, and automates the same scenarios as tests. It began in 2006 as a response to confusion about test-driven development (TDD, writing a failing test before the code), by talking about behaviour instead of tests. Its practitioners now often describe it as a conversation between business and technical people rather than a testing method. Reviews report better communication as the main benefit, but measured effects are scarce, and the learning and maintenance costs recur across studies.

Origin and relation to TDD

BDD started as TDD with different words. Dan North wrote in 2006 that he began calling TDD “BDD” after replacing the word “test” with “behaviour”, in response to confusion about TDD. He found that the new word made a whole category of coaching questions disappear (North, 2006). A systematic mapping study (a structured survey of the literature) also dates BDD’s introduction to 2006 (Binamungu & Maro, 2023). Its authors suggest that BDD’s process is close to TDD’s, so that what BDD adds lies mostly in its notation for scenarios (Binamungu & Maro, 2023).

The change began in test names and tools. North proposed naming each test as a sentence, starting with “should”, that describes the next behaviour of the class. At the end of 2003 he started writing JBehave, a replacement for the JUnit testing framework built on a vocabulary of behaviour instead of tests (North, 2006).

North and Chris Matts then carried the vocabulary from code to requirements. They drew on Eric Evans’s ubiquitous language: a vocabulary taken from the business domain that runs right through to the code (North, 2006).

Practitioners say it grew beyond that start. Liz Keogh says BDD began at the unit or class level as a replacement for TDD. It was extended to whole systems after a colleague said it looked like analysis (Keogh, 2011). She names a common language between users and business stakeholders as its biggest difference from acceptance test-driven development (ATDD), a practice that drives development from acceptance tests (Keogh, 2011).

Related terms overlap and are not settled. In a 2011 panel, Keogh defined specification by example as using examples of behaviour to specify it. Executable specifications are the same thing automated, and scenarios are the BDD term for system-level examples (North et al., 2011). North said one would implement specification by example with executable specifications, one scenario at a time. Gojko Adzic noted that the panelists disagreed, so the community had no unified language (North et al., 2011).

Adzic separates ATDD and BDD by their focus. He presents them as two models of specification by example: one centred on automated acceptance tests, the other on specifying scenarios of the system’s behaviour (Adzic, 2011b).

How BDD works

A BDD scenario describes one behaviour in three steps: a starting context (Given), an action (When) and an expected outcome (Then). North presents this template as capturing a story’s acceptance criteria (North, 2006). The mapping study defines BDD as an agile technique that specifies requirements as Given-When-Then scenarios. These can also act as executable test cases through glue code, the code that connects each sentence to the program (Binamungu & Maro, 2023).

Cucumber, a widely used BDD tool, describes BDD as three practices: discovery, formulation and automation (Cucumber (SmartBear), n.d.). Discovery is the conversation about examples, formulation is writing them as scenarios, and automation turns them into tests. Keogh calls the shallowest form of BDD conversations around scenarios that are neither captured nor automated (Keogh, 2013).

Gherkin, the plain-text format Cucumber uses for scenarios, has a small fixed syntax. A Gherkin document starts with the keyword Feature, and every non-blank line must begin with a keyword. The keywords exist in over 70 spoken languages, with English the default. The text after each keyword is matched to a block of code called a step definition (Cucumber Open Source Project, 2026).

A survey of controlled natural languages, restricted forms of a natural language, lists Gherkin among them. Only its structuring words, such as Given, And and But, are fixed. The step definitions, written in ordinary program code, constrain the rest of each step (Kuhn, 2014).

BDD scenarios are meant to serve as living documentation, meaning documentation kept in step with the code. The term is attributed to Adzic’s book on specification by example (Hilton, 2021). One definition describes documents actively synced with code changes and coupled to the source code through the toolchain (Yagel, 2015). Adzic says a directory of executable specification files is not enough: the specifications must be organised and given context (Adzic, 2011a).

Is shared understanding the benefit?

Practitioners report that BDD improves communication between business and technical roles, but also that non-developers may never open the specifications. In a survey of 75 practitioners, improving communication among stakeholders was among the main perceived benefits (Binamungu et al., 2018). A synthesis of 23 studies says BDD strengthens collaboration between quality engineers and business analysts, and that precise scenario language reduces misunderstandings (Arredondo-Reyes et al., 2024).

The same survey found the collaboration at BDD’s core can be hard or ignored, and that non-developers may never open the specifications. One respondent said people not involved in testing are not interested in test cases however readable (Binamungu et al., 2018). The survey authors note that some practitioners downplay collaboration, with later costs (Binamungu et al., 2018). A thesis summarising an interview study of 24 IT professionals says it can be difficult to convince business stakeholders and developers to use BDD (Alshammari, 2025). Another thesis says stakeholders struggle to express and negotiate requirements in Gherkin when it is written in business domain terms (Alshammari, 2025).

Keogh’s view bears on this dispute: a team that is not having conversations is not doing any kind of BDD (Keogh, 2013). On that definition, teams that skip the collaboration are practising something else.

A case study shows the gap in practice. In an avionics company’s first BDD attempt, people outside the development team found it hard to understand and negotiate requirements through feature files. The team used hand-drawn whiteboard diagrams with them instead (Islam, 2024).

Industry reports describe the same resistance from non-technical staff. Authors at Dassault Systèmes write that efforts to introduce BDD there met resistance from non-technical stakeholders, partly because Gherkin syntax was mandatory. Business analysts, specification writers and QA teams were often reluctant to adopt a formalism unlike their usual documents. The account is a company anecdote in a preprint that proposes a rival method (Jawish et al., 2026).

Measured benefits and costs Weak evidence: few or small studies support this

Evidence on BDD’s effects is thin. The mapping study found 166 papers from 2006 to 2021, few with industry insight. It also reports an acute shortage of metrics for measuring BDD specifications and the process of producing them (Binamungu & Maro, 2023).

Two small student experiments found at most better communication. In a controlled experiment with 44 students, BDD communicated better than standard user acceptance testing for safety verification, with no significant difference in productivity, test thoroughness or fault detection (Wang & Wagner, 2018). BDD was run test-last in that experiment (Wang & Wagner, 2018). A second experiment with undergraduates found no sufficient evidence that Fit tables (a table format for specifications) or Gherkin was easier to specify with or better for communication. Mean specification time was lower with Gherkin (dos Santos & Vilain, 2018).

Costs recur in qualitative work. The thematic synthesis reports long-term benefits in software quality and stakeholder satisfaction despite initial adoption challenges, a high learning curve, and resistance where testing culture is lacking (Arredondo-Reyes et al., 2024). It also says maintaining BDD specifications is particularly hard in large projects (Arredondo-Reyes et al., 2024).

A thesis adds that BDD means writing and maintaining Gherkin features and step functions, with little published work on how it is used in practice (Islam, 2024). In an action research study at an avionics company, BDD helped check the validity and consistency of requirements, but the team found Gherkin’s technical limits. BDD gave no quality criteria for scenarios, so it was hard to know when to stop refining them (Islam, 2024).

The limits concerned what Gherkin can express. It has no way to define hierarchy or dependencies between features, more than one actor, or concurrent steps. The author cautions that this was the company’s first attempt with BDD, and that experience might overcome some of these challenges (Islam, 2024).

The same thesis found the standard BDD workflow assumes stakeholders are available, take part and have experience, and ignores vague requirements and unavailable customers (Islam, 2024).

Scenario quality in real projects

What makes a good BDD suite has no agreed definition. As of 2020, no formal definition of a high-quality BDD suite had been given, despite much discussion among practitioners (Binamungu et al., 2020). In a survey of 56 practitioners, 60.7% of them developers, each of four proposed quality principles won at least 75% support. Respondents put most weight on the readability and clarity of the specifications (Binamungu et al., 2020).

Studies of open-source Gherkin suites find duplication and multiple assertions (more than one check in a scenario) to be common. A thesis mined 493 open-source Gherkin projects for smells, patterns that signal weak design. About 70% of the projects had multiple assertions and 68% had duplication. Another 36% had Arrange-Act-Assert violations, 30% lazy steps and 12% lazy outlines (Islam, 2024). Projects with smells tended to have slightly longer scenarios, and the thesis could not tell the direction of cause (Islam, 2024).

Gherkin gained Scenario Outline (one scenario run with several rows of example values) and data tables in 2009, to reduce redundancy in spec files. Many projects do not use them: a mining study of 1,572 Gherkin spec files in 23 open-source projects found that 590 used data tables, averaging two rows. Data tables might only partly shorten specifications, and earlier studies reported long, repetitive Gherkin specifications and slow test suites (Chandorkar et al., 2022).

Exact duplication of steps is widespread in public Gherkin suites. A 2026 preprint, not yet peer reviewed, found that 80.2% of the steps in 347 public GitHub repositories were exact duplicates. The median repository’s rate was 58.6% (Mughal et al., 2026). A few very large repositories dominate the pooled figure, duplication rises with repository size, and the sample leans toward starred, unarchived projects (Mughal et al., 2026).

Practitioners see this duplication as a maintenance cost, and tools can find it faster than people. In the survey of 75 practitioners, 61% said duplication makes BDD specifications hard to extend and change (Binamungu et al., 2018). In one industrial organisation, automated search found duplicate-specification refactoring candidates roughly sixty times faster than manual search (Mughal et al., 2026).

Adoption Weak evidence: few or small studies support this

Adoption figures for BDD are few and indirect. A thesis cites the 14th State of Agile survey, in which 19% of respondents reported using BDD (Islam, 2024). In a GitHub sample, about 40% of accessible repositories were real projects, and only 0.34% of those contained Gherkin (Islam, 2024).

Teams new to BDD Weak evidence: few or small studies support this

Small studies of teams new to BDD point to lack of experience as a cost. In a survey of 43 professionals on how BDD is adopted, lack of experience with BDD directly affected how well work was done (Santos et al., 2025b). A case study followed an agile team new to BDD at a security-software company. The adoption guidelines worked, and the only problem found was a need for better communication among stakeholders (Santos et al., 2025a).

For students, BDD was reported to bring more gains than losses. In a case study in a university course on mobile apps, BDD gave more benefits than harms to the development lifecycle. Whether more experienced developers would gain from it remains for further studies (Nascimento et al., 2022).

BDD scenarios with language models and agents Weak evidence: few or small studies support this

Researchers have begun using Gherkin scenarios to guide coding agents (programs in which a language model writes and revises code), with promising but preliminary results. AgileGen is an agent pipeline that uses Gherkin to add acceptance criteria to users’ incomplete requirements and to guide code generation (Zhang et al., 2024d). On the 50projects50days dataset, it reached Pass@1 (the share of tasks solved on the first attempt) of 62.5% with GPT-3.5 and 71.5% with GPT-4. These were 16.4% and 24.7% better than ChatDev_24 and GPT-4o respectively (Zhang et al., 2024d). The human evaluation used 20 participants (Zhang et al., 2024d).

Language models can also write Gherkin, but need review. In a quasi-experiment with 10 participants, Gherkin generated by two models from food-safety regulations was rated highly (relevance 95%, clarity 100% in the top two categories). Reviewers noted occasional omissions, hallucinations and mixed intents, and the authors call for human oversight (Hassani et al., 2026). E2EDev, a benchmark that scores LLM-built web software with BDD scenarios run in Behave, found that even the Claude series fails to exceed 60% performance (Liu et al., 2026i).

An industrial case study points the same way. GPT-4 Turbo wrote Gherkin acceptance scenarios from user stories, and users found them helpful 95% of the time (Ferreira et al., 2025a). Of the test cases generated by the study’s Test Flow tool, 60% were usable as generated, 8% needed minor fixes and 24% had to be regenerated. Test quality depended more on how clear the user stories and Gherkin scenarios were than on the pages under test (Ferreira et al., 2025a).

Further reading

  • North (2006): the original account of how BDD grew out of TDD.
  • Binamungu and Maro (2023): a mapping study of 166 BDD papers, with the field’s definition and its research gaps.
  • Keogh (2013): a practitioner’s argument that conversation is the core of BDD.
  • Binamungu et al. (2018): a survey of 75 practitioners on collaboration and maintaining specifications.
  • Islam (2024): a thesis on BDD in real projects, with a mining study of Gherkin smells.

Known gaps

What this article cannot tell you yet.

  1. No study measures whether BDD produces shared understanding between business and technical roles; the evidence is self-reported by practitioners who chose to answer surveys.
  2. No controlled study compares BDD with non-BDD development on defects or productivity in code; the two small student experiments found at most better communication.
  3. The primary texts of three industrial adoption studies of BDD by novice teams could not be read; only secondhand summaries were available.
  4. Acceptance test-driven development (ATDD) is not defined in the sources, so its relation to BDD rests on one practitioner’s view.
  5. Maintenance cost of Gherkin suites is asserted in the literature but not measured.
  6. The published journal version of the AgileGen study was not read, and no study compares Gherkin with other specification forms for coding agents in a controlled design.
  7. No figure exists for how often teams abandon BDD or Gherkin suites; reports of abandonment are case studies and practitioner accounts.
  8. Which works cite the main mapping study, and what later reviews say about living documentation, was not established.

References

Solid source
Rated highly trustworthy by the research, and every passage taken from it was found in it.
Weak source
Rated low, or a passage taken from it was not found in it.
Medium trust
Rated medium by the research.
Not checked
Rated high, but its passages could not all be checked against it.
Show all 29 references