SlideShare a Scribd company logo
BDD
in action
Building software that matters
John Ferguson Smart
Consultant	
  
Trainer	
  
Mentor	
  
Author	
  
Speaker	
  
Coder
John Ferguson Smart
Consultant	
  
Trainer	
  
Mentor	
  
Author	
  
Speaker	
  
Coder
John Ferguson Smart
Consultant	
  
Trainer	
  
Mentor	
  
Author	
  
Speaker	
  
Coder
John Ferguson Smart
Consultant	
  
Trainer	
  
Mentor	
  
Author	
  
Speaker	
  
Coder
So what is this BDD thing?
Using examples
So what is this BDD thing?
Using examples
a shared understanding
So what is this BDD thing?
Using examples
a shared understanding
software that matters
So what is this BDD thing?
BDD
So what is this BDD thing?
BDD
Collaboration
So what is this BDD thing?
BDD
Hunting out value
Collaboration
So what is this BDD thing?
BDD
Hunting out value
Collaboration
Building the right software
So what is this BDD thing?
BDD
Hunting out value Automated Acceptance
Criteria
Collaboration
Building the right software
So what is this BDD thing?
BDD
Hunting out value Automated Acceptance
Criteria
API and code design
Collaboration
Building the right software
So what is this BDD thing?
BDD
Hunting out value Automated Acceptance
Criteria
API and code design
Collaboration
Building the software right
Building the right software
So what is this BDD thing?
BDD
Hunting out value Automated Acceptance
Criteria
API and code design
Collaboration
Building the software right
Building the right software
Living Documentation
So what is this BDD thing?
The business owner
tells the business
analyst what he wants
1
2
The business
analyst writes a
requirements
document
3
The developer
translates the
requirements
into software
4 The tester
translates the
requirements
into test cases 5 The technical
writer translates
the software
into functional
and technical
documentation
BDD in a nutshell
A traditional development process
The business owner
tells the business
analyst what he wants
1
2
The business
analyst writes a
requirements
document
3
The developer
translates the
requirements
into software
4 The tester
translates the
requirements
into test cases 5 The technical
writer translates
the software
into functional
and technical
documentation
BDD in a nutshell
A traditional development process
The business owner
tells the business
analyst what he wants
1
2
The business
analyst writes a
requirements
document
3
The developer
translates the
requirements
into software
4 The tester
translates the
requirements
into test cases 5 The technical
writer translates
the software
into functional
and technical
documentation
BDD in a nutshell
A traditional development process
The business owner
tells the business
analyst what he wants
1
2
The business
analyst writes a
requirements
document
3
The developer
translates the
requirements
into software
4 The tester
translates the
requirements
into test cases 5 The technical
writer translates
the software
into functional
and technical
documentation
BDD in a nutshell
A traditional development process
The business owner
tells the business
analyst what he wants
1
2
The business
analyst writes a
requirements
document
3
The developer
translates the
requirements
into software
4 The tester
translates the
requirements
into test cases 5 The technical
writer translates
the software
into functional
and technical
documentation
BDD in a nutshell
A traditional development process
The business owner
tells the business
analyst what he wants
1
2
The business
analyst writes a
requirements
document
3
The developer
translates the
requirements
into software
4 The tester
translates the
requirements
into test cases 5 The technical
writer translates
the software
into functional
and technical
documentation
BDD in a nutshell
A traditional development process
The business owner
tells the business
analyst what he wants
1
2
The business
analyst writes a
requirements
document
3
The developer
translates the
requirements
into software
4 The tester
translates the
requirements
into test cases 5 The technical
writer translates
the software
into functional
and technical
documentation
BDD in a nutshell
A traditional development process
The business owner
tells the business
analyst what he wants
1
2
The business
analyst writes a
requirements
document
3
The developer
translates the
requirements
into software
4 The tester
translates the
requirements
into test cases 5 The technical
writer translates
the software
into functional
and technical
documentation
BDD in a nutshell
A traditional development process
The business owner
tells the business
analyst what he wants
1
2
The business
analyst writes a
requirements
document
3
The developer
translates the
requirements
into software
4 The tester
translates the
requirements
into test cases 5 The technical
writer translates
the software
into functional
and technical
documentation
BDD in a nutshell
A traditional development process
The business owner
tells the business
analyst what he wants
1
2
The business
analyst writes a
requirements
document
3
The developer
translates the
requirements
into software
4 The tester
translates the
requirements
into test cases 5 The technical
writer translates
the software
into functional
and technical
documentation
BDD in a nutshell
A traditional development process
The business owner
tells the business
analyst what he wants
1
2
The business
analyst writes a
requirements
document
3
The developer
translates the
requirements
into software
4 The tester
translates the
requirements
into test cases 5 The technical
writer translates
the software
into functional
and technical
documentation
BDD in a nutshell
A traditional development process
The business owner
and the business
analyst have a
conversation about
what he needs.
1
2
3
4 The tester uses
these scenarios
as the basis for
her tests
5
The automated tests provide
feedback on progress and help
document the application
The business analyst,
the developer and the
tester elaborate the
requirements together.
The scenarios guide the
developer and act as
automated tests
They define
requirements as
structured, English-
language format
"scenarios"
BDD in a nutshell
A BDD development process
The business owner
and the business
analyst have a
conversation about
what he needs.
1
2
3
4 The tester uses
these scenarios
as the basis for
her tests
5
The automated tests provide
feedback on progress and help
document the application
The business analyst,
the developer and the
tester elaborate the
requirements together.
The scenarios guide the
developer and act as
automated tests
They define
requirements as
structured, English-
language format
"scenarios"
BDD in a nutshell
A BDD development process
The business owner
and the business
analyst have a
conversation about
what he needs.
1
2
3
4 The tester uses
these scenarios
as the basis for
her tests
5
The automated tests provide
feedback on progress and help
document the application
The business analyst,
the developer and the
tester elaborate the
requirements together.
The scenarios guide the
developer and act as
automated tests
They define
requirements as
structured, English-
language format
"scenarios"
BDD in a nutshell
A BDD development process
The business owner
and the business
analyst have a
conversation about
what he needs.
1
2
3
4 The tester uses
these scenarios
as the basis for
her tests
5
The automated tests provide
feedback on progress and help
document the application
The business analyst,
the developer and the
tester elaborate the
requirements together.
The scenarios guide the
developer and act as
automated tests
They define
requirements as
structured, English-
language format
"scenarios"
BDD in a nutshell
A BDD development process
The business owner
and the business
analyst have a
conversation about
what he needs.
1
2
3
4 The tester uses
these scenarios
as the basis for
her tests
5
The automated tests provide
feedback on progress and help
document the application
The business analyst,
the developer and the
tester elaborate the
requirements together.
The scenarios guide the
developer and act as
automated tests
They define
requirements as
structured, English-
language format
"scenarios"
BDD in a nutshell
A BDD development process
The business owner
and the business
analyst have a
conversation about
what he needs.
1
2
3
4 The tester uses
these scenarios
as the basis for
her tests
5
The automated tests provide
feedback on progress and help
document the application
The business analyst,
the developer and the
tester elaborate the
requirements together.
The scenarios guide the
developer and act as
automated tests
They define
requirements as
structured, English-
language format
"scenarios"
BDD in a nutshell
A BDD development process
The business owner
and the business
analyst have a
conversation about
what he needs.
1
2
3
4 The tester uses
these scenarios
as the basis for
her tests
5
The automated tests provide
feedback on progress and help
document the application
The business analyst,
the developer and the
tester elaborate the
requirements together.
The scenarios guide the
developer and act as
automated tests
They define
requirements as
structured, English-
language format
"scenarios"
•Specifica8ons	
  are	
  elaborated	
  collabora8vely	
  
•Specifica8ons	
  use	
  a	
  common	
  language	
  
•Executable	
  specifica8ons	
  provide	
  fast	
  feedback
BDD in a nutshell
“software that matters”
Building the
thing right
Building the
right thingWhat
How
Misaligned
requirements
Poor craftsmanship
“software that matters”
Building the
thing right
Building the
right thingWhat
How
Misaligned
requirements
Poor craftsmanship
Solves the wrong
problem well
“software that matters”
Building the
thing right
Building the
right thingWhat
How
Misaligned
requirements
Poor craftsmanship
Solves the wrong
problem well
Solves the right
problem poorly
“software that matters”
Building the
thing right
Building the
right thingWhat
How
Misaligned
requirements
Poor craftsmanship
Buggy
and useless
Solves the wrong
problem well
Solves the right
problem poorly
“software that matters”
Building the
thing right
Building the
right thingWhat
How
Misaligned
requirements
Poor craftsmanship
Buggy
and useless
Slow to
change
Solves the wrong
problem well
Solves the right
problem poorly
“software that matters”
Building the
thing right
Building the
right thingWhat
How
Misaligned
requirements
Poor craftsmanship
Buggy
and useless
Hard to
maintain
Slow to
change
Solves the wrong
problem well
Solves the right
problem poorly
“software that matters”
Building the
thing right
Building the
right thingWhat
How
Misaligned
requirements
Poor craftsmanship
Buggy
and useless
Hard to
maintain
Slow to
change
Does what the business needs
Reliable
Easy to maintain
Solves the wrong
problem well
Solves the right
problem poorly
You don’t know what you don’t know
Understanding of
what needs to be
delivered
Time
You don’t know what you don’t know
Understanding of
what needs to be
delivered
Time
Requirements
phase done
Analysis
Phase done
You don’t know what you don’t know
Understanding of
what needs to be
delivered
Time
Requirements
phase done
Analysis
Phase done
You don’t know what you don’t know
Understanding of
what needs to be
delivered
Time
Requirements
phase done
Analysis
Phase done
•Our	
  ignorance	
  decreases	
  over	
  8me	
  
•It	
  does	
  not	
  decrease	
  at	
  a	
  linear	
  rate	
  
•It	
  does	
  not	
  always	
  decrease	
  in	
  a	
  predictable	
  way
Business
Goal
Business
Goal
Business
Goal
“software that matters”
We	
  start	
  with	
  a	
  business	
  goal
Business
Goal
Business
Goal
Business
Goal
“software that matters”
We	
  start	
  with	
  a	
  business	
  goal
“Increase	
  *cket	
  sales	
  by	
  5%	
  over	
  the	
  next	
  year	
  
by	
  encouraging	
  travelers	
  to	
  fly	
  with	
  Flying	
  High	
  
rather	
  than	
  with	
  a	
  rival	
  company.”
Business
Goal
Business
Goal
Business
Goal
“software that matters”
What	
  features	
  will	
  enable	
  us	
  to	
  deliver	
  this	
  goal?
FeaturesFeaturesFeatures
Business
Goal
Business
Goal
Business
Goal
“software that matters”
What	
  features	
  will	
  enable	
  us	
  to	
  deliver	
  this	
  goal?
FeaturesFeaturesFeatures
Earn	
  Frequent	
  Flyer	
  points	
  from	
  flights
Business
Goal
Business
Goal
Business
Goal
“software that matters”
What	
  features	
  will	
  enable	
  us	
  to	
  deliver	
  this	
  goal?
FeaturesFeaturesFeatures
Earn	
  Frequent	
  Flyer	
  points	
  from	
  flights
Earn	
  Frequent	
  Flyer	
  points	
  from	
  purchases
Business
Goal
Business
Goal
Business
Goal
“software that matters”
What	
  features	
  will	
  enable	
  us	
  to	
  deliver	
  this	
  goal?
FeaturesFeaturesFeatures
Earn	
  Frequent	
  Flyer	
  points	
  from	
  flights
Earn	
  Frequent	
  Flyer	
  points	
  from	
  purchases
View	
  Frequent	
  Flyer	
  account	
  balance	
  online
Business
Goal
Business
Goal
Business
Goal
“software that matters”
We	
  use	
  conversa8ons	
  around	
  examples	
  to	
  build	
  up	
  our	
  
understanding	
  of	
  these	
  features	
  
FeaturesFeaturesFeatures FeaturesFeaturesExamples
Business
Goal
Business
Goal
Business
Goal
“software that matters”
We	
  use	
  conversa8ons	
  around	
  examples	
  to	
  build	
  up	
  our	
  
understanding	
  of	
  these	
  features	
  
FeaturesFeaturesFeatures FeaturesFeaturesExamples
“A	
  new	
  Frequent	
  Flyer	
  member	
  
starts	
  off	
  with	
  Bronze	
  status”
Business
Goal
Business
Goal
Business
Goal
“software that matters”
We	
  use	
  conversa8ons	
  around	
  examples	
  to	
  build	
  up	
  our	
  
understanding	
  of	
  these	
  features	
  
FeaturesFeaturesFeatures FeaturesFeaturesExamples
“A	
  new	
  Frequent	
  Flyer	
  member	
  
starts	
  off	
  with	
  Bronze	
  status”
“If	
  she	
  earns	
  300	
  points,	
  she	
  becomes	
  a	
  
Silver	
  Frequent	
  Flyer	
  member”
“Using examples”
“Using examples”
•Explore	
  requirements	
  
•Discover	
  what	
  we	
  don’t	
  know	
  
•Clarify	
  ambigui8es	
  
•Iden8fy	
  assump8ons	
  and	
  misunderstandings	
  
“Using examples”
“A	
  new	
  Frequent	
  Flyer	
  member	
  
starts	
  off	
  with	
  Bronze	
  status”
•Explore	
  requirements	
  
•Discover	
  what	
  we	
  don’t	
  know	
  
•Clarify	
  ambigui8es	
  
•Iden8fy	
  assump8ons	
  and	
  misunderstandings	
  
“Using examples”
“A	
  new	
  Frequent	
  Flyer	
  member	
  
starts	
  off	
  with	
  Bronze	
  status”
“If	
  she	
  earns	
  300	
  points,	
  she	
  becomes	
  a	
  
Silver	
  Frequent	
  Flyer	
  member”
•Explore	
  requirements	
  
•Discover	
  what	
  we	
  don’t	
  know	
  
•Clarify	
  ambigui8es	
  
•Iden8fy	
  assump8ons	
  and	
  misunderstandings	
  
“Using examples”
“A	
  new	
  Frequent	
  Flyer	
  member	
  
starts	
  off	
  with	
  Bronze	
  status”
“If	
  she	
  earns	
  300	
  points,	
  she	
  becomes	
  a	
  
Silver	
  Frequent	
  Flyer	
  member”
“If	
  I	
  ask	
  for	
  the	
  details	
  about	
  the	
  flight	
  FH-­‐102,	
  I	
  should	
  see	
  that	
  
it	
  is	
  a	
  Sydney	
  to	
  Hong	
  Kong	
  flight	
  that	
  leaves	
  at	
  11:55pm	
  ”
•Explore	
  requirements	
  
•Discover	
  what	
  we	
  don’t	
  know	
  
•Clarify	
  ambigui8es	
  
•Iden8fy	
  assump8ons	
  and	
  misunderstandings	
  
“Using examples”
We	
  express	
  the	
  examples	
  in	
  a	
  structured	
  
format	
  using	
  simple	
  English	
  phrases
“Using examples”
We	
  express	
  the	
  examples	
  in	
  a	
  structured	
  
format	
  using	
  simple	
  English	
  phrases
“Using examples”
We	
  express	
  the	
  examples	
  in	
  a	
  structured	
  
format	
  using	
  simple	
  English	
  phrases
“Using examples”
We	
  express	
  the	
  examples	
  in	
  a	
  structured	
  
format	
  using	
  simple	
  English	
  phrases
“Using examples”
The	
  automated	
  acceptance	
  criteria	
  
guide	
  the	
  development	
  process
“Using examples”
The	
  automated	
  acceptance	
  criteria	
  
guide	
  the	
  development	
  process
“Using examples”
The	
  automated	
  acceptance	
  criteria	
  
guide	
  the	
  development	
  process
“a shared understanding”
“Having	
  the	
  conversa/on	
  	
  
is	
  more	
  important	
  than	
  	
  
recording	
  the	
  conversa/on	
  
is	
  more	
  important	
  than	
  	
  
automa/ng	
  the	
  conversa/on”	
  
-­‐	
  Liz	
  Keogh
“a shared understanding”
BA
Developer
Tester
Many teams build features like this…
“a shared understanding”
Story
BA
Developer
Tester
Many teams build features like this…
“a shared understanding”
Story
Working	
  
code
BA
Developer
Tester
Many teams build features like this…
“a shared understanding”
Story
Working	
  
code boring	
  
manual	
  
tes5ng
BA
Developer
Tester
Many teams build features like this…
“a shared understanding”
Story
bug	
  reports
Working	
  
code boring	
  
manual	
  
tes5ng
BA
Developer
Tester
Many teams build features like this…
“a shared understanding”
Story
bug	
  reports
Working	
  
code boring	
  
manual	
  
tes5ng
WASTE
BA
Developer
Tester
Many teams build features like this…
“a shared understanding”
…but a little cooperation goes a long way…
Story
“a shared understanding”
…but a little cooperation goes a long way…
Story
“a shared understanding”
…but a little cooperation goes a long way…
Story
“a shared understanding”
…but a little cooperation goes a long way…
Story
“a shared understanding”
…but a little cooperation goes a long way…
Story
Examples
“a shared understanding”
…but a little cooperation goes a long way…
Story
Examples
Automated	
  
acceptance	
  
criteria
“a shared understanding”
…but a little cooperation goes a long way…
Shared	
  
understanding
Story
Examples
Automated	
  
acceptance	
  
criteria
“a shared understanding”
…but a little cooperation goes a long way…
Working	
  code	
  	
  
and	
  	
  
Working	
  Automated	
  
Acceptance	
  Tests
Shared	
  
understanding
Story
Examples
Automated	
  
acceptance	
  
criteria
“a shared understanding”
…but a little cooperation goes a long way…
Working	
  code	
  	
  
and	
  	
  
Working	
  Automated	
  
Acceptance	
  Tests Exploratory	
  tes5ng,	
  
usability	
  tes5ng...
Shared	
  
understanding
Story
Examples
Automated	
  
acceptance	
  
criteria
“a shared understanding”
We call this “The Three Amigos”
BA	
  and/or	
  product	
  owner
Tester Developer Automatable	
  
Acceptance	
  
Criteria
Shared	
  
understanding
“a shared understanding”
We call this “The Three Amigos”
“a shared understanding”
We call this “The Three Amigos”
“a shared understanding”
We call this “The Three Amigos”
“a shared understanding”
We call this “The Three Amigos”
“a shared understanding”
We call this “The Three Amigos”
“a shared understanding”
“Automation without
collaboration is empty”
Living Documentation
Living Documentation
Living Documentation
Illustrates	
  delivered	
  features
Living Documentation
A	
  star5ng	
  point	
  for	
  manual	
  tests
Illustrates	
  delivered	
  features
Living Documentation
A	
  star5ng	
  point	
  for	
  manual	
  tests
Illustrates	
  delivered	
  features
Progress	
  repor5ng
Living Documentation
A	
  star5ng	
  point	
  for	
  manual	
  tests
Illustrates	
  delivered	
  features
Func5onal	
  and	
  technical	
  documenta5on
Progress	
  repor5ng
Automated test results tell us…
Automated test results tell us…
How	
  many	
  
tests	
  passed
Automated test results tell us…
How	
  many	
  failed
How	
  many	
  
tests	
  passed
Automated test results tell us…
How	
  many	
  failed
How	
  many	
  
tests	
  passed
How	
  many	
  weren’t	
  run
Automated test results tell us…
Automated test results tell us…
What	
  tests	
  exist	
  for	
  
a	
  given	
  feature
Automated test results tell us…
What	
  tests	
  exist	
  for	
  
a	
  given	
  feature
How	
  stable	
  the	
  feature	
  is
Automated test results tell us…
Automated test results tell us…
How	
  a	
  feature	
  was	
  
tested
Automated test results tell us…
Automated test results tell us…
What	
  a	
  feature	
  looks	
  like
Automated test results tell us…
Automated test results tell us…
What	
  a	
  feature	
  looks	
  like
Automated test results tell us…
What	
  a	
  feature	
  looks	
  like
Test results do not tell
us what was not tested
Feature Coverage
Feature Coverage
What	
  stories	
  are	
  defined	
  
for	
  this	
  feature?
Feature Coverage
What	
  stories	
  are	
  defined	
  
for	
  this	
  feature?
How	
  many	
  stories	
  have	
  automated	
  
acceptance	
  criteria?
Feature Coverage
What	
  stories	
  are	
  defined	
  
for	
  this	
  feature?
How	
  many	
  stories	
  have	
  automated	
  
acceptance	
  criteria?
What	
  acceptance	
  criteria	
  have	
  
been	
  automated?
“Living Documentation
completes the circle”
Business
Goal
Business
Goal
Business
Goal
We	
  can	
  automate	
  these	
  examples	
  in	
  the	
  form	
  of	
  
“executable	
  specifica8ons”
FeaturesFeaturesFeatures FeaturesFeaturesExamples
Low level
specifications
Low level
specifications
Low level
specifications
Executable
specifications
“building the software right”
Business
Goal
Business
Goal
Business
Goal
We	
  can	
  automate	
  these	
  examples	
  in	
  the	
  form	
  of	
  
“executable	
  specifica8ons”
FeaturesFeaturesFeatures FeaturesFeaturesExamples
Low level
specifications
Low level
specifications
Low level
specifications
Executable
specifications
“building the software right”
Business
Goal
Business
Goal
Business
Goal
We	
  can	
  automate	
  these	
  examples	
  in	
  the	
  form	
  of	
  
“executable	
  specifica8ons”
FeaturesFeaturesFeatures FeaturesFeaturesExamples
Low level
specifications
Low level
specifications
Low level
specifications
Executable
specifications
“building the software right”
Business
Goal
Business
Goal
Business
Goal
We	
  use	
  low-­‐level	
  BDD	
  or	
  TDD	
  tools	
  to	
  define	
  the	
  
behavior	
  of	
  components,	
  classes	
  etc.
FeaturesFeaturesFeatures FeaturesFeaturesExamples
Low level
specifications
Low level
specifications
Low level
specifications
Executable
specifications
“building the software right”
Low level
specifications
Low level
specifications
Low level
specifications
Low level
specifications
Low level
specifications
Business
Goal
Business
Goal
Business
Goal
We	
  use	
  low-­‐level	
  BDD	
  or	
  TDD	
  tools	
  to	
  define	
  the	
  
behavior	
  of	
  components,	
  classes	
  etc.
FeaturesFeaturesFeatures FeaturesFeaturesExamples
Low level
specifications
Low level
specifications
Low level
specifications
Executable
specifications
spock
RSpec
“building the software right”
Low level
specifications
Low level
specifications
Low level
specifications
Low level
specifications
Low level
specifications
Business
Goal
Business
Goal
Business
Goal
We	
  use	
  low-­‐level	
  BDD	
  or	
  TDD	
  tools	
  to	
  define	
  the	
  
behavior	
  of	
  components,	
  classes	
  etc.
FeaturesFeaturesFeatures FeaturesFeaturesExamples
Low level
specifications
Low level
specifications
Low level
specifications
Executable
specifications
spock
RSpec
“building the software right”
Low level
specifications
Low level
specifications
Low level
specifications
Low level
specifications
Low level
specifications
“building the software right”
Acceptance	
  criteria	
  tell	
  us	
  what	
  we	
  need	
  to	
  build…
“building the software right”
“building the software right”
What	
  would	
  we	
  like	
  the	
  API	
  to	
  look	
  like?
“building the software right”
What	
  would	
  we	
  like	
  the	
  API	
  to	
  look	
  like?
“building the software right”
What	
  would	
  we	
  like	
  the	
  API	
  to	
  look	
  like?
“building the software right”
“building the software right”
Then	
  write	
  low-­‐level	
  specifica8ons	
  for	
  the	
  code
“building the software right”
Then	
  write	
  low-­‐level	
  specifica8ons	
  for	
  the	
  code
“building the software right”
“building the software right”
“building the software right”
These	
  low	
  level	
  specifica8ons	
  become	
  technical	
  
documenta8on	
  for	
  your	
  APIs
“Every class is an API for
someone”
BDD Gotchas
1
2
3
4
BDD Gotchas
1
2
3
4
An8-­‐paQern	
  1	
  
The	
  business	
  analyst	
  writes	
  the	
  scenarios	
  and	
  then	
  gives	
  
them	
  to	
  the	
  other	
  team	
  members.
1
2
3
4
BDD Gotchas
1
2
3
4
BDD Gotchas
An8-­‐paQern	
  2	
  
The	
  tester	
  writes	
  the	
  scenarios	
  at	
  the	
  end	
  
to	
  implement	
  an	
  automated	
  test	
  suite.
1
2
3
4
5
BDD Gotchas
1
2
3
4
5
BDD Gotchas
An8-­‐paQern	
  3	
  
The	
  “Three	
  Amigos”	
  sessions	
  don’t	
  result	
  in	
  usable	
  scenarios,	
  so	
  the	
  
developer	
  invents	
  them	
  a?erwards.
1
2
3
4
5
BDD Gotchas
An8-­‐paQern	
  3	
  
The	
  “Three	
  Amigos”	
  sessions	
  don’t	
  result	
  in	
  usable	
  scenarios,	
  so	
  the	
  
developer	
  invents	
  them	
  a?erwards.
1
2
3
4
5
BDD Gotchas
1
2
3
4
5
BDD Gotchas
An8-­‐paQern	
  4	
  
The	
  scenarios	
  are	
  too	
  UI-­‐centric	
  or	
  detail-­‐focused,	
  and	
  neglect	
  to	
  express	
  
the	
  core	
  business	
  value.
42
Benefits of BDD
•Focus	
  effort	
  
•Reduce	
  waste	
  and	
  misaligned	
  requirements
43
Benefits of BDD
Deliver	
  more	
  valuable	
  soYware
44
Benefits of BDD
Make	
  changes	
  safely
45
Benefits of BDD
Faster	
  and	
  more	
  reliable	
  releases
46
Benefits of BDD
Reduced	
  maintenance	
  costs
BDD	
  requires	
  high	
  business	
  engagement	
  and	
  collabora8on	
  
Adoption challenges
BDD	
  works	
  best	
  in	
  an	
  Agile	
  or	
  Itera8ve	
  context	
  
Adoption challenges
BDD	
  does	
  not	
  work	
  well	
  in	
  a	
  silo	
  
Adoption challenges
Adoption challenges
Skill	
  and	
  prac,ce	
  required:	
  
•Wri,ng	
  good	
  scenarios	
  takes	
  prac,ce	
  
•Poorly	
  wri:en	
  tests	
  can	
  lead	
  to	
  higher	
  test-­‐maintenance	
  costs	
  
•Need	
  to	
  treat	
  test	
  automa,on	
  code	
  like	
  produc,on	
  code	
  
In conclusion…
It’s	
  behaviour	
  all	
  the	
  way	
  down
Want to learn more?
Want to learn more?
Want to learn more?
http://thucydides.info/
Want to learn more?
http://thucydides.info/
https://code.google.com/p/spock/
Thank You
John Ferguson Smart
john.smart@wakaleo.com
wakaleo
http://www.wakaleo.com

More Related Content

PDF
BDD in Action – principles, practices and real-world application
PPTX
Introduction to Bdd and cucumber
PPTX
Sexy Using Cucumber - BDD in your project
PPTX
BDD testing with cucumber
PDF
BDD & Cucumber
PPTX
Cucumber BDD
ODP
Introduction to BDD
BDD in Action – principles, practices and real-world application
Introduction to Bdd and cucumber
Sexy Using Cucumber - BDD in your project
BDD testing with cucumber
BDD & Cucumber
Cucumber BDD
Introduction to BDD

What's hot (20)

PPTX
Test Automation Framework with BDD and Cucumber
PPTX
PDF
Successfully Implementing BDD in an Agile World
PDF
An introduction to Behavior-Driven Development (BDD)
PPTX
BDD WITH CUCUMBER AND JAVA
PPTX
BDD and Behave
PDF
Behavior Driven Development with Cucumber
PDF
Introduction to React Native
PPTX
How native is React Native? | React Native vs Native App Development
PPTX
Introduction to Behaviour Driven Development
PDF
Introduction to BDD with Cucumber for Java
PPTX
Bdd – with cucumber and gherkin
PPT
Cucumber presentation
PPTX
BDD presentation
PDF
Devops Porto - CI/CD at Gitlab
PDF
Intro to react native
PDF
Cucumber ppt
PDF
Cypress e2e automation testing - day1 intor by: Hassan Hameed
PPTX
Cucumber presenation
PPTX
What Is Cucumber?
Test Automation Framework with BDD and Cucumber
Successfully Implementing BDD in an Agile World
An introduction to Behavior-Driven Development (BDD)
BDD WITH CUCUMBER AND JAVA
BDD and Behave
Behavior Driven Development with Cucumber
Introduction to React Native
How native is React Native? | React Native vs Native App Development
Introduction to Behaviour Driven Development
Introduction to BDD with Cucumber for Java
Bdd – with cucumber and gherkin
Cucumber presentation
BDD presentation
Devops Porto - CI/CD at Gitlab
Intro to react native
Cucumber ppt
Cypress e2e automation testing - day1 intor by: Hassan Hameed
Cucumber presenation
What Is Cucumber?
Ad

Similar to BDD in Action - building software that matters (20)

PDF
BDD in Action: Building Software Right and Building the Right Software
PDF
BDD Anti-patterns
PDF
It's Testing, Jim, but not as we know it - BDD for Testers
PDF
BDD in Action - Automated Web Testing with WebDriver and Serenity
PDF
Its testing-jim-but-not-as-we-know-it-devoxx
PPTX
Behavior Driven Development
PPTX
Cucumber is a Behavior Driven Development tool used to develop test cases for...
PPTX
Topic tdd-and-bdd b4usolution
PPTX
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
PDF
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
PDF
BDD in Action - Devoxx 2014
PPTX
Gateway to Agile: XP and BDD
PPTX
Behavior Driven Development with AngularJS & Jasmine
PDF
The BDD Process (Behavior-driven development)
PDF
Being Test-Driven: It's not really about testing
PPTX
BDD 001 behavoir draven delopment ts.pptx
PDF
Testing stage. being ahead business with cucumber
PDF
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
PPTX
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
PDF
Whole team approach to agile testing bdd can help better pune 15th meetup
BDD in Action: Building Software Right and Building the Right Software
BDD Anti-patterns
It's Testing, Jim, but not as we know it - BDD for Testers
BDD in Action - Automated Web Testing with WebDriver and Serenity
Its testing-jim-but-not-as-we-know-it-devoxx
Behavior Driven Development
Cucumber is a Behavior Driven Development tool used to develop test cases for...
Topic tdd-and-bdd b4usolution
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
BDD in Action - Devoxx 2014
Gateway to Agile: XP and BDD
Behavior Driven Development with AngularJS & Jasmine
The BDD Process (Behavior-driven development)
Being Test-Driven: It's not really about testing
BDD 001 behavoir draven delopment ts.pptx
Testing stage. being ahead business with cucumber
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Whole team approach to agile testing bdd can help better pune 15th meetup
Ad

More from John Ferguson Smart Limited (20)

PPTX
My Reading Specs - Refactoring Patterns for Gherkin Scenarios
PDF
Artisti e Condotierri - How can your team become artists of the 21st century ...
PDF
Engage! Bringing teams together to deliver software that makes a difference
PDF
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
PDF
Sustainable Test Automation with Serenity BDD and Screenplay
PDF
Feature Mapping Workshop
PDF
Engage! Bringing teams together to deliver software that makes a difference
PDF
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
PDF
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
PDF
Shift left-devoxx-pl
PDF
Screenplay - Next generation automated acceptance testing
PDF
Cucumber and Spock Primer
PDF
All the world's a stage – the next step in automated testing practices
PDF
CukeUp 2016 Agile Product Planning Workshop
PDF
BDD Anti-patterns
PDF
Serenity and the Journey Pattern
PDF
BDD - Collaborate like you mean it!
PDF
BDD-Driven Microservices
PDF
BDD: The unit test of the product owner
PDF
TDD and BDD in Java 8 - what's in it for me?
My Reading Specs - Refactoring Patterns for Gherkin Scenarios
Artisti e Condotierri - How can your team become artists of the 21st century ...
Engage! Bringing teams together to deliver software that makes a difference
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
Sustainable Test Automation with Serenity BDD and Screenplay
Feature Mapping Workshop
Engage! Bringing teams together to deliver software that makes a difference
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
Shift left-devoxx-pl
Screenplay - Next generation automated acceptance testing
Cucumber and Spock Primer
All the world's a stage – the next step in automated testing practices
CukeUp 2016 Agile Product Planning Workshop
BDD Anti-patterns
Serenity and the Journey Pattern
BDD - Collaborate like you mean it!
BDD-Driven Microservices
BDD: The unit test of the product owner
TDD and BDD in Java 8 - what's in it for me?

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Machine learning based COVID-19 study performance prediction
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPT
Teaching material agriculture food technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Cloud computing and distributed systems.
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation theory and applications.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Electronic commerce courselecture one. Pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Machine learning based COVID-19 study performance prediction
Mobile App Security Testing_ A Comprehensive Guide.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Teaching material agriculture food technology
Review of recent advances in non-invasive hemoglobin estimation
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Cloud computing and distributed systems.
Spectral efficient network and resource selection model in 5G networks
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Chapter 3 Spatial Domain Image Processing.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation theory and applications.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
MYSQL Presentation for SQL database connectivity
NewMind AI Weekly Chronicles - August'25 Week I
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
cuic standard and advanced reporting.pdf
Electronic commerce courselecture one. Pdf

BDD in Action - building software that matters

  • 2. John Ferguson Smart Consultant   Trainer   Mentor   Author   Speaker   Coder
  • 3. John Ferguson Smart Consultant   Trainer   Mentor   Author   Speaker   Coder
  • 4. John Ferguson Smart Consultant   Trainer   Mentor   Author   Speaker   Coder
  • 5. John Ferguson Smart Consultant   Trainer   Mentor   Author   Speaker   Coder
  • 6. So what is this BDD thing?
  • 7. Using examples So what is this BDD thing?
  • 8. Using examples a shared understanding So what is this BDD thing?
  • 9. Using examples a shared understanding software that matters So what is this BDD thing?
  • 10. BDD So what is this BDD thing?
  • 11. BDD Collaboration So what is this BDD thing?
  • 12. BDD Hunting out value Collaboration So what is this BDD thing?
  • 13. BDD Hunting out value Collaboration Building the right software So what is this BDD thing?
  • 14. BDD Hunting out value Automated Acceptance Criteria Collaboration Building the right software So what is this BDD thing?
  • 15. BDD Hunting out value Automated Acceptance Criteria API and code design Collaboration Building the right software So what is this BDD thing?
  • 16. BDD Hunting out value Automated Acceptance Criteria API and code design Collaboration Building the software right Building the right software So what is this BDD thing?
  • 17. BDD Hunting out value Automated Acceptance Criteria API and code design Collaboration Building the software right Building the right software Living Documentation So what is this BDD thing?
  • 18. The business owner tells the business analyst what he wants 1 2 The business analyst writes a requirements document 3 The developer translates the requirements into software 4 The tester translates the requirements into test cases 5 The technical writer translates the software into functional and technical documentation BDD in a nutshell A traditional development process
  • 19. The business owner tells the business analyst what he wants 1 2 The business analyst writes a requirements document 3 The developer translates the requirements into software 4 The tester translates the requirements into test cases 5 The technical writer translates the software into functional and technical documentation BDD in a nutshell A traditional development process
  • 20. The business owner tells the business analyst what he wants 1 2 The business analyst writes a requirements document 3 The developer translates the requirements into software 4 The tester translates the requirements into test cases 5 The technical writer translates the software into functional and technical documentation BDD in a nutshell A traditional development process
  • 21. The business owner tells the business analyst what he wants 1 2 The business analyst writes a requirements document 3 The developer translates the requirements into software 4 The tester translates the requirements into test cases 5 The technical writer translates the software into functional and technical documentation BDD in a nutshell A traditional development process
  • 22. The business owner tells the business analyst what he wants 1 2 The business analyst writes a requirements document 3 The developer translates the requirements into software 4 The tester translates the requirements into test cases 5 The technical writer translates the software into functional and technical documentation BDD in a nutshell A traditional development process
  • 23. The business owner tells the business analyst what he wants 1 2 The business analyst writes a requirements document 3 The developer translates the requirements into software 4 The tester translates the requirements into test cases 5 The technical writer translates the software into functional and technical documentation BDD in a nutshell A traditional development process
  • 24. The business owner tells the business analyst what he wants 1 2 The business analyst writes a requirements document 3 The developer translates the requirements into software 4 The tester translates the requirements into test cases 5 The technical writer translates the software into functional and technical documentation BDD in a nutshell A traditional development process
  • 25. The business owner tells the business analyst what he wants 1 2 The business analyst writes a requirements document 3 The developer translates the requirements into software 4 The tester translates the requirements into test cases 5 The technical writer translates the software into functional and technical documentation BDD in a nutshell A traditional development process
  • 26. The business owner tells the business analyst what he wants 1 2 The business analyst writes a requirements document 3 The developer translates the requirements into software 4 The tester translates the requirements into test cases 5 The technical writer translates the software into functional and technical documentation BDD in a nutshell A traditional development process
  • 27. The business owner tells the business analyst what he wants 1 2 The business analyst writes a requirements document 3 The developer translates the requirements into software 4 The tester translates the requirements into test cases 5 The technical writer translates the software into functional and technical documentation BDD in a nutshell A traditional development process
  • 28. The business owner tells the business analyst what he wants 1 2 The business analyst writes a requirements document 3 The developer translates the requirements into software 4 The tester translates the requirements into test cases 5 The technical writer translates the software into functional and technical documentation BDD in a nutshell A traditional development process
  • 29. The business owner and the business analyst have a conversation about what he needs. 1 2 3 4 The tester uses these scenarios as the basis for her tests 5 The automated tests provide feedback on progress and help document the application The business analyst, the developer and the tester elaborate the requirements together. The scenarios guide the developer and act as automated tests They define requirements as structured, English- language format "scenarios" BDD in a nutshell A BDD development process
  • 30. The business owner and the business analyst have a conversation about what he needs. 1 2 3 4 The tester uses these scenarios as the basis for her tests 5 The automated tests provide feedback on progress and help document the application The business analyst, the developer and the tester elaborate the requirements together. The scenarios guide the developer and act as automated tests They define requirements as structured, English- language format "scenarios" BDD in a nutshell A BDD development process
  • 31. The business owner and the business analyst have a conversation about what he needs. 1 2 3 4 The tester uses these scenarios as the basis for her tests 5 The automated tests provide feedback on progress and help document the application The business analyst, the developer and the tester elaborate the requirements together. The scenarios guide the developer and act as automated tests They define requirements as structured, English- language format "scenarios" BDD in a nutshell A BDD development process
  • 32. The business owner and the business analyst have a conversation about what he needs. 1 2 3 4 The tester uses these scenarios as the basis for her tests 5 The automated tests provide feedback on progress and help document the application The business analyst, the developer and the tester elaborate the requirements together. The scenarios guide the developer and act as automated tests They define requirements as structured, English- language format "scenarios" BDD in a nutshell A BDD development process
  • 33. The business owner and the business analyst have a conversation about what he needs. 1 2 3 4 The tester uses these scenarios as the basis for her tests 5 The automated tests provide feedback on progress and help document the application The business analyst, the developer and the tester elaborate the requirements together. The scenarios guide the developer and act as automated tests They define requirements as structured, English- language format "scenarios" BDD in a nutshell A BDD development process
  • 34. The business owner and the business analyst have a conversation about what he needs. 1 2 3 4 The tester uses these scenarios as the basis for her tests 5 The automated tests provide feedback on progress and help document the application The business analyst, the developer and the tester elaborate the requirements together. The scenarios guide the developer and act as automated tests They define requirements as structured, English- language format "scenarios" BDD in a nutshell A BDD development process
  • 35. The business owner and the business analyst have a conversation about what he needs. 1 2 3 4 The tester uses these scenarios as the basis for her tests 5 The automated tests provide feedback on progress and help document the application The business analyst, the developer and the tester elaborate the requirements together. The scenarios guide the developer and act as automated tests They define requirements as structured, English- language format "scenarios" •Specifica8ons  are  elaborated  collabora8vely   •Specifica8ons  use  a  common  language   •Executable  specifica8ons  provide  fast  feedback BDD in a nutshell
  • 36. “software that matters” Building the thing right Building the right thingWhat How Misaligned requirements Poor craftsmanship
  • 37. “software that matters” Building the thing right Building the right thingWhat How Misaligned requirements Poor craftsmanship Solves the wrong problem well
  • 38. “software that matters” Building the thing right Building the right thingWhat How Misaligned requirements Poor craftsmanship Solves the wrong problem well Solves the right problem poorly
  • 39. “software that matters” Building the thing right Building the right thingWhat How Misaligned requirements Poor craftsmanship Buggy and useless Solves the wrong problem well Solves the right problem poorly
  • 40. “software that matters” Building the thing right Building the right thingWhat How Misaligned requirements Poor craftsmanship Buggy and useless Slow to change Solves the wrong problem well Solves the right problem poorly
  • 41. “software that matters” Building the thing right Building the right thingWhat How Misaligned requirements Poor craftsmanship Buggy and useless Hard to maintain Slow to change Solves the wrong problem well Solves the right problem poorly
  • 42. “software that matters” Building the thing right Building the right thingWhat How Misaligned requirements Poor craftsmanship Buggy and useless Hard to maintain Slow to change Does what the business needs Reliable Easy to maintain Solves the wrong problem well Solves the right problem poorly
  • 43. You don’t know what you don’t know Understanding of what needs to be delivered Time
  • 44. You don’t know what you don’t know Understanding of what needs to be delivered Time Requirements phase done Analysis Phase done
  • 45. You don’t know what you don’t know Understanding of what needs to be delivered Time Requirements phase done Analysis Phase done
  • 46. You don’t know what you don’t know Understanding of what needs to be delivered Time Requirements phase done Analysis Phase done •Our  ignorance  decreases  over  8me   •It  does  not  decrease  at  a  linear  rate   •It  does  not  always  decrease  in  a  predictable  way
  • 48. Business Goal Business Goal Business Goal “software that matters” We  start  with  a  business  goal “Increase  *cket  sales  by  5%  over  the  next  year   by  encouraging  travelers  to  fly  with  Flying  High   rather  than  with  a  rival  company.”
  • 49. Business Goal Business Goal Business Goal “software that matters” What  features  will  enable  us  to  deliver  this  goal? FeaturesFeaturesFeatures
  • 50. Business Goal Business Goal Business Goal “software that matters” What  features  will  enable  us  to  deliver  this  goal? FeaturesFeaturesFeatures Earn  Frequent  Flyer  points  from  flights
  • 51. Business Goal Business Goal Business Goal “software that matters” What  features  will  enable  us  to  deliver  this  goal? FeaturesFeaturesFeatures Earn  Frequent  Flyer  points  from  flights Earn  Frequent  Flyer  points  from  purchases
  • 52. Business Goal Business Goal Business Goal “software that matters” What  features  will  enable  us  to  deliver  this  goal? FeaturesFeaturesFeatures Earn  Frequent  Flyer  points  from  flights Earn  Frequent  Flyer  points  from  purchases View  Frequent  Flyer  account  balance  online
  • 53. Business Goal Business Goal Business Goal “software that matters” We  use  conversa8ons  around  examples  to  build  up  our   understanding  of  these  features   FeaturesFeaturesFeatures FeaturesFeaturesExamples
  • 54. Business Goal Business Goal Business Goal “software that matters” We  use  conversa8ons  around  examples  to  build  up  our   understanding  of  these  features   FeaturesFeaturesFeatures FeaturesFeaturesExamples “A  new  Frequent  Flyer  member   starts  off  with  Bronze  status”
  • 55. Business Goal Business Goal Business Goal “software that matters” We  use  conversa8ons  around  examples  to  build  up  our   understanding  of  these  features   FeaturesFeaturesFeatures FeaturesFeaturesExamples “A  new  Frequent  Flyer  member   starts  off  with  Bronze  status” “If  she  earns  300  points,  she  becomes  a   Silver  Frequent  Flyer  member”
  • 57. “Using examples” •Explore  requirements   •Discover  what  we  don’t  know   •Clarify  ambigui8es   •Iden8fy  assump8ons  and  misunderstandings  
  • 58. “Using examples” “A  new  Frequent  Flyer  member   starts  off  with  Bronze  status” •Explore  requirements   •Discover  what  we  don’t  know   •Clarify  ambigui8es   •Iden8fy  assump8ons  and  misunderstandings  
  • 59. “Using examples” “A  new  Frequent  Flyer  member   starts  off  with  Bronze  status” “If  she  earns  300  points,  she  becomes  a   Silver  Frequent  Flyer  member” •Explore  requirements   •Discover  what  we  don’t  know   •Clarify  ambigui8es   •Iden8fy  assump8ons  and  misunderstandings  
  • 60. “Using examples” “A  new  Frequent  Flyer  member   starts  off  with  Bronze  status” “If  she  earns  300  points,  she  becomes  a   Silver  Frequent  Flyer  member” “If  I  ask  for  the  details  about  the  flight  FH-­‐102,  I  should  see  that   it  is  a  Sydney  to  Hong  Kong  flight  that  leaves  at  11:55pm  ” •Explore  requirements   •Discover  what  we  don’t  know   •Clarify  ambigui8es   •Iden8fy  assump8ons  and  misunderstandings  
  • 61. “Using examples” We  express  the  examples  in  a  structured   format  using  simple  English  phrases
  • 62. “Using examples” We  express  the  examples  in  a  structured   format  using  simple  English  phrases
  • 63. “Using examples” We  express  the  examples  in  a  structured   format  using  simple  English  phrases
  • 64. “Using examples” We  express  the  examples  in  a  structured   format  using  simple  English  phrases
  • 65. “Using examples” The  automated  acceptance  criteria   guide  the  development  process
  • 66. “Using examples” The  automated  acceptance  criteria   guide  the  development  process
  • 67. “Using examples” The  automated  acceptance  criteria   guide  the  development  process
  • 69. “Having  the  conversa/on     is  more  important  than     recording  the  conversa/on   is  more  important  than     automa/ng  the  conversa/on”   -­‐  Liz  Keogh “a shared understanding”
  • 70. BA Developer Tester Many teams build features like this… “a shared understanding”
  • 71. Story BA Developer Tester Many teams build features like this… “a shared understanding”
  • 72. Story Working   code BA Developer Tester Many teams build features like this… “a shared understanding”
  • 73. Story Working   code boring   manual   tes5ng BA Developer Tester Many teams build features like this… “a shared understanding”
  • 74. Story bug  reports Working   code boring   manual   tes5ng BA Developer Tester Many teams build features like this… “a shared understanding”
  • 75. Story bug  reports Working   code boring   manual   tes5ng WASTE BA Developer Tester Many teams build features like this… “a shared understanding”
  • 76. …but a little cooperation goes a long way… Story “a shared understanding”
  • 77. …but a little cooperation goes a long way… Story “a shared understanding”
  • 78. …but a little cooperation goes a long way… Story “a shared understanding”
  • 79. …but a little cooperation goes a long way… Story “a shared understanding”
  • 80. …but a little cooperation goes a long way… Story Examples “a shared understanding”
  • 81. …but a little cooperation goes a long way… Story Examples Automated   acceptance   criteria “a shared understanding”
  • 82. …but a little cooperation goes a long way… Shared   understanding Story Examples Automated   acceptance   criteria “a shared understanding”
  • 83. …but a little cooperation goes a long way… Working  code     and     Working  Automated   Acceptance  Tests Shared   understanding Story Examples Automated   acceptance   criteria “a shared understanding”
  • 84. …but a little cooperation goes a long way… Working  code     and     Working  Automated   Acceptance  Tests Exploratory  tes5ng,   usability  tes5ng... Shared   understanding Story Examples Automated   acceptance   criteria “a shared understanding”
  • 85. We call this “The Three Amigos” BA  and/or  product  owner Tester Developer Automatable   Acceptance   Criteria Shared   understanding “a shared understanding”
  • 86. We call this “The Three Amigos” “a shared understanding”
  • 87. We call this “The Three Amigos” “a shared understanding”
  • 88. We call this “The Three Amigos” “a shared understanding”
  • 89. We call this “The Three Amigos” “a shared understanding”
  • 90. We call this “The Three Amigos” “a shared understanding”
  • 95. Living Documentation A  star5ng  point  for  manual  tests Illustrates  delivered  features
  • 96. Living Documentation A  star5ng  point  for  manual  tests Illustrates  delivered  features Progress  repor5ng
  • 97. Living Documentation A  star5ng  point  for  manual  tests Illustrates  delivered  features Func5onal  and  technical  documenta5on Progress  repor5ng
  • 99. Automated test results tell us… How  many   tests  passed
  • 100. Automated test results tell us… How  many  failed How  many   tests  passed
  • 101. Automated test results tell us… How  many  failed How  many   tests  passed How  many  weren’t  run
  • 102. Automated test results tell us…
  • 103. Automated test results tell us… What  tests  exist  for   a  given  feature
  • 104. Automated test results tell us… What  tests  exist  for   a  given  feature How  stable  the  feature  is
  • 105. Automated test results tell us…
  • 106. Automated test results tell us… How  a  feature  was   tested
  • 107. Automated test results tell us…
  • 108. Automated test results tell us… What  a  feature  looks  like
  • 109. Automated test results tell us…
  • 110. Automated test results tell us… What  a  feature  looks  like
  • 111. Automated test results tell us… What  a  feature  looks  like
  • 112. Test results do not tell us what was not tested
  • 114. Feature Coverage What  stories  are  defined   for  this  feature?
  • 115. Feature Coverage What  stories  are  defined   for  this  feature? How  many  stories  have  automated   acceptance  criteria?
  • 116. Feature Coverage What  stories  are  defined   for  this  feature? How  many  stories  have  automated   acceptance  criteria? What  acceptance  criteria  have   been  automated?
  • 118. Business Goal Business Goal Business Goal We  can  automate  these  examples  in  the  form  of   “executable  specifica8ons” FeaturesFeaturesFeatures FeaturesFeaturesExamples Low level specifications Low level specifications Low level specifications Executable specifications “building the software right”
  • 119. Business Goal Business Goal Business Goal We  can  automate  these  examples  in  the  form  of   “executable  specifica8ons” FeaturesFeaturesFeatures FeaturesFeaturesExamples Low level specifications Low level specifications Low level specifications Executable specifications “building the software right”
  • 120. Business Goal Business Goal Business Goal We  can  automate  these  examples  in  the  form  of   “executable  specifica8ons” FeaturesFeaturesFeatures FeaturesFeaturesExamples Low level specifications Low level specifications Low level specifications Executable specifications “building the software right”
  • 121. Business Goal Business Goal Business Goal We  use  low-­‐level  BDD  or  TDD  tools  to  define  the   behavior  of  components,  classes  etc. FeaturesFeaturesFeatures FeaturesFeaturesExamples Low level specifications Low level specifications Low level specifications Executable specifications “building the software right” Low level specifications Low level specifications Low level specifications Low level specifications Low level specifications
  • 122. Business Goal Business Goal Business Goal We  use  low-­‐level  BDD  or  TDD  tools  to  define  the   behavior  of  components,  classes  etc. FeaturesFeaturesFeatures FeaturesFeaturesExamples Low level specifications Low level specifications Low level specifications Executable specifications spock RSpec “building the software right” Low level specifications Low level specifications Low level specifications Low level specifications Low level specifications
  • 123. Business Goal Business Goal Business Goal We  use  low-­‐level  BDD  or  TDD  tools  to  define  the   behavior  of  components,  classes  etc. FeaturesFeaturesFeatures FeaturesFeaturesExamples Low level specifications Low level specifications Low level specifications Executable specifications spock RSpec “building the software right” Low level specifications Low level specifications Low level specifications Low level specifications Low level specifications
  • 125. Acceptance  criteria  tell  us  what  we  need  to  build… “building the software right”
  • 127. What  would  we  like  the  API  to  look  like? “building the software right”
  • 128. What  would  we  like  the  API  to  look  like? “building the software right”
  • 129. What  would  we  like  the  API  to  look  like? “building the software right”
  • 131. Then  write  low-­‐level  specifica8ons  for  the  code “building the software right”
  • 132. Then  write  low-­‐level  specifica8ons  for  the  code “building the software right”
  • 134. “building the software right” These  low  level  specifica8ons  become  technical   documenta8on  for  your  APIs
  • 135. “Every class is an API for someone”
  • 137. BDD Gotchas 1 2 3 4 An8-­‐paQern  1   The  business  analyst  writes  the  scenarios  and  then  gives   them  to  the  other  team  members.
  • 139. 1 2 3 4 BDD Gotchas An8-­‐paQern  2   The  tester  writes  the  scenarios  at  the  end   to  implement  an  automated  test  suite.
  • 141. 1 2 3 4 5 BDD Gotchas An8-­‐paQern  3   The  “Three  Amigos”  sessions  don’t  result  in  usable  scenarios,  so  the   developer  invents  them  a?erwards.
  • 142. 1 2 3 4 5 BDD Gotchas An8-­‐paQern  3   The  “Three  Amigos”  sessions  don’t  result  in  usable  scenarios,  so  the   developer  invents  them  a?erwards.
  • 144. 1 2 3 4 5 BDD Gotchas An8-­‐paQern  4   The  scenarios  are  too  UI-­‐centric  or  detail-­‐focused,  and  neglect  to  express   the  core  business  value.
  • 145. 42 Benefits of BDD •Focus  effort   •Reduce  waste  and  misaligned  requirements
  • 146. 43 Benefits of BDD Deliver  more  valuable  soYware
  • 147. 44 Benefits of BDD Make  changes  safely
  • 148. 45 Benefits of BDD Faster  and  more  reliable  releases
  • 149. 46 Benefits of BDD Reduced  maintenance  costs
  • 150. BDD  requires  high  business  engagement  and  collabora8on   Adoption challenges
  • 151. BDD  works  best  in  an  Agile  or  Itera8ve  context   Adoption challenges
  • 152. BDD  does  not  work  well  in  a  silo   Adoption challenges
  • 153. Adoption challenges Skill  and  prac,ce  required:   •Wri,ng  good  scenarios  takes  prac,ce   •Poorly  wri:en  tests  can  lead  to  higher  test-­‐maintenance  costs   •Need  to  treat  test  automa,on  code  like  produc,on  code  
  • 154. In conclusion… It’s  behaviour  all  the  way  down
  • 155. Want to learn more?
  • 156. Want to learn more?
  • 157. Want to learn more? http://thucydides.info/
  • 158. Want to learn more? http://thucydides.info/ https://code.google.com/p/spock/
  • 159. Thank You John Ferguson Smart john.smart@wakaleo.com wakaleo http://www.wakaleo.com