bdt workshop - anand bagmar
DESCRIPTION
In "vodQA - Testing and Beyond" held in March 2012 in ThoughtWorks Pune, Anand Bagmar spoke about - "What is Behavior Driven Testing (BDT)? How does it differ from Behavior Driven Development? What tools support this kind of testing? The value proposition BDT offers." As a follow-up to that introduction to BDT, we conducted a Behavior Driven Testing (BDT) workshop in the ThoughtWorks Pune office. This workshop was the first in a series of vodQA Geek Nights. For more information about the workshop, visit https://www.facebook.com/groups/vodqa/TRANSCRIPT
Structure of workshop
• Few slides • Few exercises based on case study • Lots of interac:ons • Homework
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:
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
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
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
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
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
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 [email protected] Then I am able to Save and Con:nue When I re-‐login as user [email protected] And I search for and select some flight op:on Then I should see my contact details pre-‐populated
Given I, a registered user [email protected], 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
hVp://essenceo]es:ng.blogspot.com/search/label/bdt
Vodqa-‐[email protected]
Vodqa-‐[email protected]