Behaviour-driven development
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.
First published ; last updated .
Known gaps
What this article cannot tell you yet.
- 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.
- 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.
- The primary texts of three industrial adoption studies of BDD by novice teams could not be read; only secondhand summaries were available.
- Acceptance test-driven development (ATDD) is not defined in the sources, so its relation to BDD rests on one practitioner’s view.
- Maintenance cost of Gherkin suites is asserted in the literature but not measured.
- 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.
- No figure exists for how often teams abandon BDD or Gherkin suites; reports of abandonment are case studies and practitioner accounts.
- 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
- Adzic, G. (2011a). Specification by example, chapter 11: Evolving a documentation system. Manning (livebook). https://livebook.manning.com/book/specification-by-example/chapter-11 Medium trust Book, read in full.
- Adzic, G. (2011b). Specification by example, chapter 3: Living documentation. Manning Publications. https://livebook.manning.com/book/specification-by-example/chapter-3 Medium trust Book, read in full.
- Alshammari, A. (2025). On the use of user interface specific domain Gherkin in behaviour driven development. PhD thesis, University of Glasgow. https://theses.gla.ac.uk/85190/2/2025AlshammariPhD.pdf Medium trust Read in full.
- Arredondo-Reyes, V. M., Dominguez-Isidro, S., Sanchez-Garcia, A. J., & Ocharan-Hernandez, J. O. (2024). Thematic synthesis of behavior-driven development: An analytical approach. Trudy ISP RAN / Proceedings of the Institute for System Programming of the RAS, 36(6), 161-178. https://ispranproceedings.elpub.ru/jour/article/download/1880/1732 Medium trust Peer-reviewed, read in full.
- Binamungu, L. P., Embury, S. M., & Konstantinou, N. (2018). Maintaining behaviour driven development specifications: Challenges and opportunities. SANER 2018, IEEE. https://lepebina.github.io/maintaining.pdf Medium trust Peer-reviewed, read in full.
- Binamungu, L. P., Embury, S. M., & Konstantinou, N. (2020). Characterising the quality of behaviour driven development specifications. Agile Processes in Software Engineering and Extreme Programming (XP 2020), LNBIP 383, pp. 87-102. https://link.springer.com/chapter/10.1007/978-3-030-49392-9_6 Solid source Peer-reviewed, read in full.
- Binamungu, L. P., & Maro, S. (2023). Behaviour driven development: A systematic mapping study. arXiv:2305.05567 (Journal of Systems and Software). https://arxiv.org/pdf/2305.05567 Solid source Preprint, read in full.
- Chandorkar, A., Patkar, N., Di Sorbo, A., & Nierstrasz, O. (2022). An exploratory study on the usage of Gherkin features in open-source projects. University of Bern, Software Composition Group. https://scg.unibe.ch/assets/archive/papers/Patk22b.pdf Solid source Peer-reviewed, read in full.
- Cucumber (SmartBear) (n.d.). Behaviour-driven development. Cucumber documentation. https://cucumber.io/docs/bdd/ Medium trust Documentation, read in full.
- Cucumber Open Source Project (2026). Gherkin reference. Cucumber documentation. https://cucumber.io/docs/gherkin/reference/ Solid source Documentation, read in full.
- dos Santos, E. C., & Vilain, P. (2018). Automated acceptance tests as software requirements: An experiment to compare the applicability of Fit tables and Gherkin language. Agile Processes in Software Engineering and Extreme Programming (XP 2018), Springer. https://link.springer.com/chapter/10.1007/978-3-319-91602-6_7 Medium trust Peer-reviewed, abstract only.
- Ferreira, M., Viegas, L., Faria, J. P., & Lima, B. (2025a). Acceptance test generation with large language models: An industrial case study. arXiv preprint 2504.07244. https://arxiv.org/abs/2504.07244 Medium trust Peer-reviewed, read in large part.
- Hassani, S., Sabetzadeh, M., & Amyot, D. (2026). From law to Gherkin: A human-centred quasi-experiment on the quality of LLM-generated behavioural specifications from food-safety regulations. arXiv:2508.20744 (v2). https://arxiv.org/abs/2508.20744 Medium trust Preprint, read in full.
- Hilton, P. (2021). Principles of living documentation. hilton.org.uk. https://hilton.org.uk/blog/living-documentation-principles Medium trust Blog post, read in full.
- Islam, G. (2024). On the real world practice of Behaviour Driven Development. PhD thesis, University of Glasgow. https://theses.gla.ac.uk/84085/1/2024IslamPhD.pdf Medium trust Read in full.
- Jawish, P., et al. (2026). Algorithm-driven development: A proactive approach to improving software quality and reducing defects. arXiv preprint. https://arxiv.org/pdf/2608.01533 Weak source Preprint, read in full.
- Keogh, L. (2011). ATDD vs. BDD, and a potted history of some related stuff. lizkeogh.com (blog). https://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/ Medium trust Blog post, read in full.
- Keogh, L. (2013). Behavior-driven development: Shallow and deep. lizkeogh.com (blog). https://lizkeogh.com/2013/07/01/behavior-driven-development-shallow-and-deep/ Medium trust Blog post, read in full.
- Kuhn, T. (2014). A survey and classification of controlled natural languages. Computational Linguistics, 40(1), 121-170. https://arxiv.org/pdf/1507.01701 Solid source Peer-reviewed, read in full.
- Liu, J., Huang, C., Guan, Z., Lei, W., & Deng, Y. (2026i). E2EDev: Benchmarking large language models in end-to-end software development task. arXiv:2510.14509 (v4). https://arxiv.org/abs/2510.14509 Solid source Preprint, read in full.
- Mughal, A. H., Fatima, N., & Bilal, M. (2026). Deja vu at scale: Paraphrase-robust detection of duplicate Gherkin steps in behaviour-driven software testing with sentence-transformer embeddings and a 1.1M-step open benchmark. arXiv preprint 2604.20462. https://arxiv.org/pdf/2604.20462 Solid source Preprint, read in full.
- Nascimento, N., Santos, A., Sales, A., & Chanin, R. (2022). Teaching BDD in active learning environments: A multi-study analysis. CSEDU 2022, SCITEPRESS. https://www.scitepress.org/Papers/2022/110573/110573.pdf Medium trust Peer-reviewed, read in full.
- North, D. (2006). Introducing BDD. Dan North & Associates (originally Better Software, March 2006). https://dannorth.net/blog/introducing-bdd/ Medium trust Blog post, read in full.
- North, D., Adzic, G., Keogh, L., Wynne, M., et al. (2011). Virtual panel: Specification by example, executable specifications, scenarios and feature injection. InfoQ. https://www.infoq.com/articles/virtual-panel-bdd Medium trust News article, read in full.
- Santos, S., Melo, G. S., Soares, M., & Rocha, F. G. (2025b). Perception of professionals regarding behavior-driven development (BDD): A descriptive and statistical study. Proceedings of the 27th International Conference on Enterprise Information Systems (ICEIS), Vol. 2, pp. 264-271, SciTePress. https://www.scitepress.org/PublishedPapers/2025/133556 Medium trust Peer-reviewed, abstract only.
- Santos, S. R. R. d., et al. (2025a). Guidelines for adopting behavior-driven development (BDD): A case study. SciTePress. https://www.scitepress.org/Papers/2025/136817/136817.pdf Medium trust Preprint, abstract only.
- Wang, Y., & Wagner, S. (2018). Combining STPA and BDD for safety analysis and verification in agile development: A controlled experiment. arXiv:1804.01715 (XP 2018). https://arxiv.org/abs/1804.01715 Medium trust Preprint, read in full.
- Yagel, R. (2015). Lido: Wiki based living documentation with domain knowledge. SKY 2015 workshop, SCITEPRESS. https://www.scitepress.org/papers/2015/56437/56437.pdf Medium trust Peer-reviewed, read in full.
- Zhang, S., Xing, Z., Guo, R., Xu, F., Chen, L., Zhang, Z., Zhang, X., et al. (2024d). Empowering agile-based generative software development through human-AI teamwork. arXiv:2407.15568v2 (published in ACM Transactions on Software Engineering and Methodology, 34(6), 2025). https://arxiv.org/pdf/2407.15568v2 Weak source Preprint, read in full. A passage taken from it was not found in it.