Now half a year ago I heard about Acceptance Test Driven Development
(ATDD). I think it was during the SC2009-event in London, Gojko
Adcik's presentation IIRC.
How would you guys compare ATDD and BDD? Are they the same? What is
the difference.
PS. Found a slide share about ATDD:
http://www.slideshare.net/tcmak/atdd-in-practice DS
--
twitter.com/olofb
olofb.wordpress.com
olofb.wordpress.com/tag/english
That's excelent doubt Olof, I have asked myself the same. I like the 33rd slide:
Variations - an escape?
* Behaviour-driven development
* Example-driven development
* Executable requirements
* Names don't matter, but underlying practices matter
* Worthwhile to try your business people do not like "testing"
If I'm not wrong when Dan started BDD there was not this idea of ATDD
(Kent Beck released TDD by Example in 2003, and if I am not wrong, he
doesn't talk about acceptance tests there, just units) so maybe ATDD
was influencied by BDD.
> If I'm not wrong when Dan started BDD there was not this idea of ATDD
When I joined Thoughtworks in November 2004, we were doing ATDD at one
client. Maybe. The acceptance tests looked something like this:
bring up the application
click on the tab for "Sales"
type "10234151" into the item box
click "Purchase"
type "1234 5678 9012 3456" into the credit card box
click "Yes"
type "Mr. Brown" in the name field
type "LU3 3NF" in the postcode field
click "Find address"
select the 3rd address
click "Yes"
etc. etc. etc.
Then, eventually, having bought the fridge, we'd get around to
refunding the fridge, also in this hugely procedural style - and each
of these lines was actual code, rather than plain text.
There were over 160 acceptance tests. 60% of them were failing. They
were completely unmaintainable.
What Dan did was show me how to get these steps into reusable objects:
Given Mr Brown has bought an Electrolux Fridge at £153.50
When Mr Brown brings back the Electrolux Fridge for a refund
Then Mr Brown should get a refund of £153.50
And the stock of Electrolux Fridge should go up by 1.
In JBehave 1, Given / When / Then were actual objects which we
extended to make each of these steps. It was then very easy to move
them around, change how each of these steps worked, add new steps -
and the G/W/T syntax meant that I was naturally dividing up my code
into these steps.
Then, of course, I found out that using G/W/T was a great way to talk
about scenarios, discover hidden contexts that should really be dealt
with in other stories, understand the scope of what we were dealing
with, etc.
Then I found out that the same language being used at a system level
could also be used at a unit level, making the examples there even
more powerful.
Then I found out how the language of BDD plays into the ubiquitous
domain language, carrying that into the code base more easily.
Then I found out how to use the scenarios to drive outside-in
development (which wasn't being pushed back then either).
Now, if you ask a bunch of ATDDers, they might say "That's just ATDD
done well." You still can't ask a business person "Give me an
acceptance test" as easily as you can ask "Give me a scenario", nor
was "ATDD done well" the common way in which ATDD was being taught at
the time.
Cheers,
Liz.
--
Elizabeth Keogh
l...@lunivore.com
http://lizkeogh.com
http://jbehave.org