Behavior-Driven Development (BDD)

Behavior-Driven Development (BDD)

Behavior-driven development, or BDD, is a methodology devised to bridge the gap between the business needs of the software and the real features of the software in development. It consists of two processes:

  • Increased collaboration between business, development, and QA teams to understand the expected behavior of the system.
  • Documentation of expected system behavior that functions as both specification during development and as tests during QA.

Cucumber is a tool used in BDD. Cucumber defines a domain-specific language for test automation that reads like English. User stories convert to steps, which in turn convert to operations on the system. Finally, checking the impact of these steps on the system gives insight into whether it behaves as expected.

BDD fits in very well with the agile methodology by rapidly iterating the user's needs. It is also compatible with test-driven development because the behavior documentation is convertible to test cases.

Write clean and secure code with DeepSource

Powerful static analysis that takes 5 minutes to set up and helps you fix code health and security problems on every pull request.