It's not a secret anymore!*
The moose likes Design and the fly likes What is BDD, TDD, ATDD? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Design
Bookmark "What is BDD, TDD, ATDD?" Watch "What is BDD, TDD, ATDD?" New topic
Author

What is BDD, TDD, ATDD?

Mani Sarkar
Greenhorn

Joined: Jun 12, 2013
Posts: 5
Hi John,

Can you please explain in terms of steps or process during the dev process, the differences between the three and how they (can) play a role, individually or in a combination?

Cheers,
mani
John Smart
Author
Ranch Hand

Joined: Aug 06, 2013
Posts: 33
    
    5
Hi Mani,

In simple terms, BDD can be viewed as an approach that includes both ATDD (automated acceptance critieria) and TDD (at the coding level).
- When discovering and defining the requirements, we use concrete examples and scenarios to help understand what the customer really needs, and, where possible, we use automated acceptance criteria to enhance feedback and communication. So like ATDD (Acceptance-Test Driven Development), BDD involves automating acceptance criteria. However BDD places more emphasis on making sure the examples being automated are expressed in a form that can be easily understood and validated by the whole team (including the customer)
- At a coding level, BDD uses a variation of TDD - like TDD, we use unit tests to design our code. However, with BDD, we emphasis that the unit tests describe the *expected behavior* of the code ("what should this class do?") as opposed to just testing methods. So we might write a test called "shouldTransferFundsToDesinationAccount()", rather than just "testTransfer()". We try to think in terms of "executable specifications" rather than just unit tests, and some dedicated unit testing BDD tools (Spock, Jasmine, Rspec...) help express tests in these terms. This has the design benefits of traditional Kent-Beck style TDD, but also documents the design better, and helps ensure that the behavior being implemented contributes to the original business value defined in the acceptance criteria.

- John.
 
wood burning stoves
 
subject: What is BDD, TDD, ATDD?
 
Similar Threads
What is the difference between process & thread??
state diagram vs activity diagram
Part One Test
Runtime exec() multiple parameters
Renaming hibernate.cfg.xml