SlideShare a Scribd company logo
1 of 40
Download to read offline
Behavior	
  Driven	
  Tes.ng	
  (BDT)	
  
Workshop	
  
Intent	
  of	
  workshop	
  
•  Learn	
  by	
  experience	
  
Structure	
  of	
  workshop	
  
•  Few	
  slides	
  
•  Few	
  exercises	
  based	
  on	
  case	
  study	
  
•  Lots	
  of	
  interac:ons	
  
•  Homework	
  
Behavior	
  Driven	
  Development	
  	
  
(BDD)	
  
RED	
  
GREEN	
  REFACTOR	
  
Behavior	
  Driven	
  Tes:ng	
  
(BDT)	
  
Expected	
  Func,onality:	
  
	
  
The	
  customer	
  should	
  be	
  able	
  to	
  withdraw	
  
money	
  from	
  his	
  account	
  via	
  an	
  ATM	
  machine	
  
Given	
  the	
  account	
  has	
  balance	
  of	
  5000	
  
When	
  the	
  customer	
  requests	
  1000	
  
Then	
  the	
  account	
  is	
  debited	
  by	
  1000	
  
BDD	
  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	
  
BDT	
  Example:	
  
Case	
  Study	
  
Phase	
  1	
  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	
  
Search	
  	
  
Search	
  
Results	
  
Contact	
  
Informa,on	
  
Search	
  Module
Search	
  Results	
  
Contact	
  Details	
  
Contact	
  Details	
  
Phase	
  1	
  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	
  
Search	
  	
  
Search	
  
Results	
  
Contact	
  
Informa,on	
  
Phase	
  1	
  -­‐	
  Showcase	
  
Test	
  specifica:on	
  styles	
  
•  Impera:ve	
  
	
  
•  Declara:ve	
  
Phase	
  1	
  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	
  
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	
  
	
  
...	
  
…	
  
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	
  buVon	
  
	
  
Then	
  I	
  should	
  be	
  on	
  the	
  next	
  page	
  
	
  
Given	
  I,	
  a	
  guest	
  user,	
  search	
  for	
  flight	
  op:ons	
  for	
  a	
  
one-­‐way	
  trip	
  for	
  1	
  Adult	
  
	
  
When	
  I	
  select	
  the	
  first	
  flight	
  
And	
  I	
  enter	
  valid	
  contact	
  details	
  
	
  
Then	
  I	
  am	
  able	
  to	
  Save	
  and	
  Con:nue	
  
Declara:ve	
  style	
  
Given	
  I,	
  a	
  guest	
  user,	
  search	
  for	
  flight	
  op:ons	
  for	
  a	
  
one-­‐way	
  trip	
  for	
  1	
  Adult	
  from	
  Delhi	
  to	
  Bangalore	
  
	
  
When	
  I	
  select	
  the	
  first	
  flight	
  
And	
  I	
  enter	
  valid	
  contact	
  details	
  for	
  traveller1	
  
	
  
Then	
  I	
  am	
  able	
  to	
  Save	
  and	
  Con:nue	
  
Declara:ve	
  style	
  
Case	
  Study	
  -­‐	
  updated	
  
Phase	
  2	
  Requirements	
  
•  User	
  registra:on	
  possible	
  now	
  from	
  Contact	
  
informa:on	
  page	
  
•  Registered	
  user	
  can	
  login	
  from	
  home	
  page	
  
(below	
  search	
  criteria)	
  
•  When	
  booking	
  :cket,	
  contact	
  informa:on	
  pre-­‐
filled	
  based	
  on	
  the	
  logged	
  in	
  user	
  informa:on	
  
Registered	
  User	
  
Phase	
  2	
  Requirements	
  
•  User	
  registra:on	
  possible	
  now	
  from	
  Contact	
  
informa:on	
  page	
  
•  Registered	
  user	
  can	
  login	
  from	
  home	
  page	
  
(below	
  search	
  criteria)	
  
•  When	
  booking	
  :cket,	
  contact	
  informa:on	
  pre-­‐
filled	
  based	
  on	
  the	
  logged	
  in	
  user	
  informa:on	
  
Login	
   Search	
  	
  
Search	
  
Results	
  
Contact	
  
Informa,on	
  
• User	
  
registra,on	
  
Phase	
  2	
  -­‐	
  Showcase	
  
Given	
  I,	
  as	
  a	
  guest	
  user,	
  search	
  for	
  flight	
  op:ons	
  for	
  a	
  
one-­‐way	
  trip	
  for	
  1	
  Adult	
  
	
  
When	
  I	
  select	
  the	
  first	
  flight	
  
And	
  I	
  enter	
  valid	
  contact	
  details	
  
And	
  I	
  register	
  myself	
  as	
  user	
  foo@bar.com	
  
	
  
Then	
  I	
  am	
  able	
  to	
  Save	
  and	
  Con:nue	
  
	
  
When	
  I	
  re-­‐login	
  as	
  user	
  foo@bar.com	
  
And	
  I	
  search	
  for	
  and	
  select	
  some	
  flight	
  op:on	
  
Then	
  I	
  should	
  see	
  my	
  contact	
  details	
  pre-­‐populated	
  
Given	
  I,	
  a	
  registered	
  user	
  foo@bar.com,	
  search	
  for	
  flight	
  
op:ons	
  for	
  a	
  one-­‐way	
  trip	
  for	
  1	
  Adult	
  from	
  Delhi	
  to	
  
Bangalore	
  
	
  
When	
  I	
  select	
  the	
  first	
  flight	
  
And	
  I	
  enter	
  invalid	
  contact	
  details	
  for	
  traveller1	
  
Then	
  I	
  should	
  not	
  be	
  able	
  to	
  proceed	
  to	
  passenger	
  details	
  
	
  
When	
  I	
  enter	
  valid	
  contact	
  details	
  for	
  traveller1	
  
And	
  I	
  enter	
  valid	
  passenger	
  details	
  for	
  traveller1	
  
And	
  I	
  enter	
  my	
  Visa	
  card	
  details	
  to	
  make	
  the	
  payment	
  
	
  
Then	
  my	
  flight	
  is	
  booked	
  	
  
And	
  I	
  get	
  the	
  email	
  confirma:on	
  on	
  the	
  registered	
  email	
  
address	
  
A	
  prac:ce	
  that	
  makes	
  Agile	
  Teams	
  	
  
successful	
  
Test	
  Automa.on	
  
A	
  prac:ce	
  that	
  makes	
  Agile	
  Tes:ng	
  
unsuccessful	
  
Test	
  Automa.on	
  
Ideal	
  Test	
  Pyramid	
  
What	
  does	
  BDT	
  do	
  for	
  me?	
  
hVp://essenceo]es:ng.blogspot.com/search/label/bdt	
  
	
  
Vodqa-­‐pune@thoughtworks.com	
  
Vodqa-­‐bangalore@thoughtworks.com	
  

More Related Content

More from Thoughtworks

Design System as a Product
Design System as a ProductDesign System as a Product
Design System as a ProductThoughtworks
 
Designers, Developers & Dogs
Designers, Developers & DogsDesigners, Developers & Dogs
Designers, Developers & DogsThoughtworks
 
Cloud-first for fast innovation
Cloud-first for fast innovationCloud-first for fast innovation
Cloud-first for fast innovationThoughtworks
 
More impact with flexible teams
More impact with flexible teamsMore impact with flexible teams
More impact with flexible teamsThoughtworks
 
Culture of Innovation
Culture of InnovationCulture of Innovation
Culture of InnovationThoughtworks
 
Developer Experience
Developer ExperienceDeveloper Experience
Developer ExperienceThoughtworks
 
When we design together
When we design togetherWhen we design together
When we design togetherThoughtworks
 
Hardware is hard(er)
Hardware is hard(er)Hardware is hard(er)
Hardware is hard(er)Thoughtworks
 
Customer-centric innovation enabled by cloud
 Customer-centric innovation enabled by cloud Customer-centric innovation enabled by cloud
Customer-centric innovation enabled by cloudThoughtworks
 
Amazon's Culture of Innovation
Amazon's Culture of InnovationAmazon's Culture of Innovation
Amazon's Culture of InnovationThoughtworks
 
When in doubt, go live
When in doubt, go liveWhen in doubt, go live
When in doubt, go liveThoughtworks
 
Don't cross the Rubicon
Don't cross the RubiconDon't cross the Rubicon
Don't cross the RubiconThoughtworks
 
Your test coverage is a lie!
Your test coverage is a lie!Your test coverage is a lie!
Your test coverage is a lie!Thoughtworks
 
Docker container security
Docker container securityDocker container security
Docker container securityThoughtworks
 
Redefining the unit
Redefining the unitRedefining the unit
Redefining the unitThoughtworks
 
Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Thoughtworks
 
A Tribute to Turing
A Tribute to TuringA Tribute to Turing
A Tribute to TuringThoughtworks
 
Rsa maths worked out
Rsa maths worked outRsa maths worked out
Rsa maths worked outThoughtworks
 

More from Thoughtworks (20)

Design System as a Product
Design System as a ProductDesign System as a Product
Design System as a Product
 
Designers, Developers & Dogs
Designers, Developers & DogsDesigners, Developers & Dogs
Designers, Developers & Dogs
 
Cloud-first for fast innovation
Cloud-first for fast innovationCloud-first for fast innovation
Cloud-first for fast innovation
 
More impact with flexible teams
More impact with flexible teamsMore impact with flexible teams
More impact with flexible teams
 
Culture of Innovation
Culture of InnovationCulture of Innovation
Culture of Innovation
 
Dual-Track Agile
Dual-Track AgileDual-Track Agile
Dual-Track Agile
 
Developer Experience
Developer ExperienceDeveloper Experience
Developer Experience
 
When we design together
When we design togetherWhen we design together
When we design together
 
Hardware is hard(er)
Hardware is hard(er)Hardware is hard(er)
Hardware is hard(er)
 
Customer-centric innovation enabled by cloud
 Customer-centric innovation enabled by cloud Customer-centric innovation enabled by cloud
Customer-centric innovation enabled by cloud
 
Amazon's Culture of Innovation
Amazon's Culture of InnovationAmazon's Culture of Innovation
Amazon's Culture of Innovation
 
When in doubt, go live
When in doubt, go liveWhen in doubt, go live
When in doubt, go live
 
Don't cross the Rubicon
Don't cross the RubiconDon't cross the Rubicon
Don't cross the Rubicon
 
Error handling
Error handlingError handling
Error handling
 
Your test coverage is a lie!
Your test coverage is a lie!Your test coverage is a lie!
Your test coverage is a lie!
 
Docker container security
Docker container securityDocker container security
Docker container security
 
Redefining the unit
Redefining the unitRedefining the unit
Redefining the unit
 
Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22
 
A Tribute to Turing
A Tribute to TuringA Tribute to Turing
A Tribute to Turing
 
Rsa maths worked out
Rsa maths worked outRsa maths worked out
Rsa maths worked out
 

Recently uploaded

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Anand Bagmar BDT Workshop Bangalore - May2013

  • 1. Behavior  Driven  Tes.ng  (BDT)   Workshop  
  • 2. Intent  of  workshop   •  Learn  by  experience  
  • 3. Structure  of  workshop   •  Few  slides   •  Few  exercises  based  on  case  study   •  Lots  of  interac:ons   •  Homework  
  • 7. Expected  Func,onality:     The  customer  should  be  able  to  withdraw   money  from  his  account  via  an  ATM  machine  
  • 8. Given  the  account  has  balance  of  5000   When  the  customer  requests  1000   Then  the  account  is  debited  by  1000   BDD  Example:  
  • 9. 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   BDT  Example:  
  • 11.
  • 12. Phase  1  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  
  • 13. Search     Search   Results   Contact   Informa,on  
  • 18. Phase  1  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  
  • 19. Search     Search   Results   Contact   Informa,on  
  • 20. Phase  1  -­‐  Showcase  
  • 21. Test  specifica:on  styles   •  Impera:ve     •  Declara:ve  
  • 22. Phase  1  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. 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     ...  
  • 24. …   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  buVon     Then  I  should  be  on  the  next  page    
  • 25. Given  I,  a  guest  user,  search  for  flight  op:ons  for  a   one-­‐way  trip  for  1  Adult     When  I  select  the  first  flight   And  I  enter  valid  contact  details     Then  I  am  able  to  Save  and  Con:nue   Declara:ve  style  
  • 26. Given  I,  a  guest  user,  search  for  flight  op:ons  for  a   one-­‐way  trip  for  1  Adult  from  Delhi  to  Bangalore     When  I  select  the  first  flight   And  I  enter  valid  contact  details  for  traveller1     Then  I  am  able  to  Save  and  Con:nue   Declara:ve  style  
  • 27. Case  Study  -­‐  updated  
  • 28. Phase  2  Requirements   •  User  registra:on  possible  now  from  Contact   informa:on  page   •  Registered  user  can  login  from  home  page   (below  search  criteria)   •  When  booking  :cket,  contact  informa:on  pre-­‐ filled  based  on  the  logged  in  user  informa:on  
  • 30.
  • 31. Phase  2  Requirements   •  User  registra:on  possible  now  from  Contact   informa:on  page   •  Registered  user  can  login  from  home  page   (below  search  criteria)   •  When  booking  :cket,  contact  informa:on  pre-­‐ filled  based  on  the  logged  in  user  informa:on  
  • 32. Login   Search     Search   Results   Contact   Informa,on   • User   registra,on  
  • 33. Phase  2  -­‐  Showcase  
  • 34. Given  I,  as  a  guest  user,  search  for  flight  op:ons  for  a   one-­‐way  trip  for  1  Adult     When  I  select  the  first  flight   And  I  enter  valid  contact  details   And  I  register  myself  as  user  foo@bar.com     Then  I  am  able  to  Save  and  Con:nue     When  I  re-­‐login  as  user  foo@bar.com   And  I  search  for  and  select  some  flight  op:on   Then  I  should  see  my  contact  details  pre-­‐populated  
  • 35. Given  I,  a  registered  user  foo@bar.com,  search  for  flight   op:ons  for  a  one-­‐way  trip  for  1  Adult  from  Delhi  to   Bangalore     When  I  select  the  first  flight   And  I  enter  invalid  contact  details  for  traveller1   Then  I  should  not  be  able  to  proceed  to  passenger  details     When  I  enter  valid  contact  details  for  traveller1   And  I  enter  valid  passenger  details  for  traveller1   And  I  enter  my  Visa  card  details  to  make  the  payment     Then  my  flight  is  booked     And  I  get  the  email  confirma:on  on  the  registered  email   address  
  • 36. A  prac:ce  that  makes  Agile  Teams     successful   Test  Automa.on  
  • 37. A  prac:ce  that  makes  Agile  Tes:ng   unsuccessful   Test  Automa.on  
  • 39. What  does  BDT  do  for  me?