SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
Anand Bagmar - Behavior Driven Testing (BDT) in Agile
I delivered this talk in SiliconIndia's SoftTec 2012 on 14th July 2012. I introduce Behavior Driven Testing (BDT) with a couple of examples, the different ways of writing the tests in Imperative and Declarative style, the value proposition of BDT, and how BDT can help you build a very good safety net using Test Automation suite.
I delivered this talk in SiliconIndia's SoftTec 2012 on 14th July 2012. I introduce Behavior Driven Testing (BDT) with a couple of examples, the different ways of writing the tests in Imperative and Declarative style, the value proposition of BDT, and how BDT can help you build a very good safety net using Test Automation suite.
3.
Story
planning
and
wri/ng
Showcase
IPM
Automa/on
(execu/on,
QA
kickoff
maintenance)
Agile
Tes.ng
in
an
Itera.on
Manual
+
Exploratory
Story
kickoff
Tes/ng
BA
/
QA
Test
Scenario
Volleyball
Wri/ng
Implement
Test
Automa/on
4.
A
prac*ce
that
makes
Agile
Teams
successful?
Test
Automa.on
5.
A
prac*ce
that
makes
Agile
Teams
unsuccessful?
Test
Automa.on
6.
The
Test
Pyramid
• “Succeeding
with
Agile”
–
Mike
Cohn
• Mar*n
Fowler
–
Test
Pyramid
– hCp://mar*nfowler.com/bliki/TestPyramid.html
7.
Ideal
Test
Pyramid
Func/onal
Tests
(GUI)
• Developers
&
/
QA
team
API
Tests
• Developers
&
/
QA
team
Integra/on
tests
• Developers
Component
tests
• Developers
Unit
Tests
• Developers
Cost
/
Effort
Time
8.
Test
Pyramid
reality
Development
team
Test
Pyramid
QA
team
Test
Pyramid
14.
Expected
Func/onality:
The
customer
should
be
able
to
withdraw
money
from
his
account
via
an
ATM
machine
15.
BDD
Example:
Given
the
account
has
balance
of
5000
When
the
customer
requests
1000
Then
the
account
is
debited
by
1000
16.
BDT
Example:
Given
the
account
is
in
credit
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
17.
New
Expected
Func/onality:
The
customer
should
be
able
to
withdraw
money
from
his
account
only
if
his
card
is
valid
18.
BDT
Example
-‐
updated:
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
20.
Requirements
• Guest
User
is
able
to
search
for
a
flight
for
a
single
traveller
• Ability
to
specify
contact
informa*on
for
person
booking
the
flight
23.
Test
specifica*on
styles
• Impera*ve
• Declara*ve
24.
Impera*ve
style
Given
I
am
a
guest
user
on
the
Indigo
home
page
And
I
select
“round”
trip
op*on
And
I
select
“Pune”
from
the
origin
dropdown
And
I
select
“Bangalore”
from
the
des*na*on
drop
down
And
I
select
departure
date
as
“5
July
2012”
And
I
select
returning
date
as
“25
July
2012”
When
I
click
on
Search
Then
I
should
see
the
search
results
page
And
I
should
see
at
least
1
op*on
for
my
criteria
...
25.
…
When
I
select
the
“first”
op*on
Then
I
am
on
the
Contact
Informa*on
page
When
I
enter
first
name
as
“foo”
And
I
enter
last
name
as
“bar”
…
…
And
I
click
the
“Select
and
Con/nue”
buCon
Then
I
should
be
on
the
next
page
26.
Declara*ve
style
Given
I
am
a
guest
user
When
I
search
for
flight
op*ons
for
a
“one-‐way”
trip
for
“1”
“Adult”
from
“Delhi”
to
“Bangalore”
And
I
select
the
“first”
flight
And
I
enter
“valid”
contact
details
for
“traveller1”
Then
I
am
able
to
Save
and
Con*nue
27.
Func/onal
Tests
(GUI)
• Developers
&
/
QA
team
API
Tests
• Developers
&
/
QA
team
Integra/on
tests
• Developers
Component
tests
• Developers
Unit
Tests
• Developers