testing – What is BDD and how is it different from TDD?


What is BDD and how is it different from TDD?


BDD – behavior-driven development – is behavior-driven development. That is, there is a special person (or people) who writes descriptions like "I, as a user, want when the start button was pressed then the menu was shown as in the picture." (there are specially highlighted keywords). Programmers have long written special tools (for example, cucumber ) that translate such descriptions into tests (sometimes completely transparent to the programmer). And then the classic development with tests.

What is the advantage of BDD?

  • tests readable for non-programmers.
  • they are easy to change. They are often written in near-pure English.
  • they can now be written by the product owner or other interested parties.
  • the test results are more "human".
  • tests are independent of the target programming language. Migration to another language is greatly simplified.

(The word tests is not highlighted by chance, because now tests are both descriptions and their actual implementation.)

Scroll to Top