Hi,
BDD and TDD stands for different purposes with different actors.
In BDD, stakeholders work on the functionalities of software units (coarse grain, black-box approach) whereas on TDD developers work on the object's features (fine-grain, white-box approach) that made the functionalities. So, the tooling in BDD should be different of the tooling used in TDD (BDD is more high-level than TDD).
In BDD each functionalities are describes as :
As a <role>
I want <some feature>
So that <I gain a benefit>
And the functionality is described in different scenarios (nominal and error ones) :
Given <some initial context>
When <an event occurs>
Then <ensure some outcomes>
Basic example:
As a customer,
I want to withdraw cash from an ATM,
so that I don�t have to wait in line at the bank.
Scenario 1: Account is in credit
Given the account is in credit
And the card is valid
And the dispenser contains cash
When the customer requests cash
Then ensure the account is debited
And ensure cash is dispensed
And ensure the card is returned
In fact, a useful and good BDD tool must provide :
- a way to define a set of initial data
- a DSL to define the functionalities and for each of them to express the scenarios according to the schema above
- an engine that feeds automatically the scenario from the data set and that outputs the result.
Miguel Moquillon