Relation between BDD and ATDD

158 views
Skip to first unread message

Olof Bjarnason

unread,
Sep 17, 2009, 2:04:15 AM9/17/09
to behaviordriv...@googlegroups.com
I've read quite a bit about BDD, but even more on TDD.

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

Hugo Lopes Tavares

unread,
Sep 17, 2009, 3:20:35 PM9/17/09
to behaviordriv...@googlegroups.com
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.
I am confused, because I sent an e-mail to Steve Freeman and he told
me some BDD ideas come from their work at www.mockobjects.com, and
there they talk about ATDD and TDD and mock objects as we do.
Well, it would be great if Dan answer this thread and I hope we get
good answers :)

aslak hellesoy

unread,
Sep 17, 2009, 4:14:13 PM9/17/09
to behaviordriv...@googlegroups.com
On Thu, Sep 17, 2009 at 9:20 PM, Hugo Lopes Tavares <hlt...@gmail.com> wrote:

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.

Dan started talking about BDD in ThoughtWorks UK around 2003. I *think* ATDD evolved around the same time, but somewhere in the US.
Today, they are very similar sets of principles and practices (outside-in), but in my view, BDD is a superset of BDD.

BDD also has the notion of ubiquitous language (borrowed from DDD), and business value (mostly influenced by Chris Matts I think).

My 0.02

Aslak

Alexander Kueken

unread,
Sep 17, 2009, 4:33:15 PM9/17/09
to behaviordriv...@googlegroups.com
Last year Dave gave a presentation about BDD, I think it was at QCon.
In this talk, he explained that BDD is derived from different agile
methodologies. One of the methodologies he mentioned was acceptance
test driven planning. I am not deep enought into it, to estimate the
differents between ATDP and ATDD. But from my point of view, ATDD is a
subset of BDD. BDD addresses different levels of tests (beside of a
lot other concepts), while ATDD, how I know it, only addresses
acceptance tests.

It is very difficult to determine how the differnt methodology
influenced each other. On the reasearch for my thesis I found a
methodology called story-test driven development, which was first
mentioned 1999. It is part of "Industrial XP". The concept of STDD is
closly retated to BDD or ATDD, but it is a little bit older than the
two.

For me it is a little bit like design patterns: different people
solved the same problems successfuly, with slightly different
concepts. So the basic idea behind it, could npot be so bad. :)

Alexander
--------------------
Alexander Kueken
alex...@kueken.net




Elizabeth Keogh

unread,
Sep 19, 2009, 5:03:03 AM9/19/09
to behaviordriv...@googlegroups.com
On Thu, Sep 17, 2009 at 8:20 PM, Hugo Lopes Tavares <hlt...@gmail.com> wrote:

> 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

wes

unread,
Sep 29, 2009, 11:37:29 AM9/29/09
to Behaviour Driven Development
The first i heard about acceptance testing was when i was introduced
to extreme programming in 2002. http://www.extremeprogramming.org/rules/functionaltests.html.
Where I work we were using Fit and FitNesse with a year or so after
this (not sure exactly when) and we were calling it ATDD. I honestly
do not know who coined the term though. It seem very close to the
time that these emails are talking about Dan introducing BDD because
we were all reading the DDD book.

We were talking about a ubiquitous language. The things we did not
have was a tool to keep the language closer to the language of the
customer and also keep the test/fixture code clean. We really
struggled with a lot of duplication are very complex inheritance
hierarchies. We also struggled with tests that were very wordy and
made the tests very hard to follow and of course maintain.

In my opinion the goals were the same. We definitely were not talking
in the given when then language that Dan introduced. However, if you
look at the old fitnesse action fixture and you will see something
similar (very loosely similar :) ) in the enter press and check
methods. Obviously it is tied way to tightly to a GUI language than
the domain.

For me when I heard Dan speak about BDD, I think Agile 2008 with Liz,
it really made me start thinking differently. They are not identical
in my opinion but BDD and ATDD seem to come with the same desire. BDD
just does it with a better language which makes a huge difference.
Reply all
Reply to author
Forward
0 new messages