Skip to main content
2 of 2
deleted 1 character in body

Both are a form of test driven development, since you write the tests upfront. The main difference is that TDD tests are technical tests often unit-tests created during developing of a feature and are written just before you implement a part of the feature in the code-base. Where BDD tests are often written before the coding starts and are human readable and anyone should be able to understand what they test. BDD tests are used as Specification by Example.

But its a bit more complex than that as BDD frameworks like JBehave can also be used to write unit-tests, but also for end-2-end integration tests. And nothing is really forcing you to make the tests readable by non developers.

There is also a third term ATDD (Acceptance test-driven development) which is how BDD was called before the BDD era. This makes the difference between the both a little bit more clear.

Suggested reads are

Personally I think we should find another name for TDD which makes it clear that its a cycle for writing unit-tests, because now its so broad that any tests defined before the coding could be called a form of TDD.

Hope I not confuse you more, but the main difference is technical tests testing the working of methods (TDD) vs human readable tests describing the behavior (BDD).