Hi, Le 21 avr. 2015 à 10:14, Miguel Moquillon a écrit :
> 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 yes, you're right on all these points. I'm not aware of such a library for Pharo but it would be very nice. On top of that, you could add a dashboard collecting automatically these tests (that are more or less User Stories) to show your customer which user stories are completed. To come back to my proposition, it is just a first step to BDD to not prevent people to define tests with something like shouldAccountBalanceBePositiveAfterEachOperation (more behavior driven) rather than testMyWonderfulMethod that may leads people to test the implementation details and not the expected behavior.
smime.p7s
Description: S/MIME cryptographic signature
