bdd - collaborate like you mean it!
TRANSCRIPT
John Ferguson
Smart
Introductions“I help teams of smart people
learn to work together more efficiently, to deliver better software faster”
The essence of BDD
Collaborate to discover requirements and identify uncertainty
Using examples at multiple levels
And a common language to build a shared understanding
To deliver software that matters
The essence of BDD
Collaborate to discover requirements and identify uncertainty
Using examples at multiple levels
And a common language to build a shared understanding
To deliver software that matters
The essence of BDD
Collaborate to discover requirements and identify uncertainty
Using examples at multiple levels
And a common language to build a shared understanding
To deliver software that matters
The essence of BDD
Collaborate to discover requirements and identify uncertainty
Using examples at multiple levels
And a common language to build a shared understanding
To deliver software that matters
The essence of BDD
Collaborate to discover requirements and identify uncertainty
Using examples at multiple levels
And a common language to build a shared understanding
To deliver software that matters
The BDD way
Working code and
Working Automated Acceptance Tests
Shared understanding
StoryExamplesAutomated acceptance
criteria
The BDD way
Working code and
Working Automated Acceptance Tests
Exploratory testing, usability
testing...
Shared understanding
StoryExamplesAutomated acceptance
criteria
The BDD wayBA and/or product owner
Tester Developer Automatable Acceptance
Criteria
Shared understanding
Frequent Flyer Application Goal: Encourage travellers to fly with Flying High airlines more often by allowing them to cumulate Frequent Flyer points that they can spend on cheaper flights.
Goals
The BDD way
Frequent Flyer Application Goal: Encourage travellers to fly with Flying High airlines more often by allowing them to cumulate Frequent Flyer points that they can spend on cheaper flights.
Goals
Earning points from flights
Capabilities
Earning points from spending with partners
Viewing points earned
Spending points on bookings
The BDD way
Frequent Flyer Application Goal: Encourage travellers to fly with Flying High airlines more often by allowing them to cumulate Frequent Flyer points that they can spend on cheaper flights.
Goals
Earning points from flights
Capabilities
Earning points from spending with partners
Viewing points earned
Spending points on bookings
FeaturesViewing current points balance
View points needed to achieve the next status level
Calculating points needed for a given destination
The BDD way
“Don’t take my word for it”
Feature: Authenticate using social media In order to access the application more easily As a new user I want to authenticate using social media instead of having to provide a username and password
“Don’t take my word for it”
Feature: Authenticate using social media In order to access the application more easily As a new user I want to authenticate using social media instead of having to provide a username and password
Feature: Authenticate using social media In order to access the application more easily As a new user I want to authenticate using social media instead of having to provide a username and password
Scenario: Login via LinkedIn Scenario: Login via Twitter
“Don’t take my word for it”
Feature: Authenticate using social media In order to access the application more easily As a new user I want to authenticate using social media instead of having to provide a username and password
Feature: Authenticate using social media In order to access the application more easily As a new user I want to authenticate using social media instead of having to provide a username and password
Scenario: Login via LinkedIn Scenario: Login via Twitter
“Don’t take my word for it”
Feature: Authenticate using social media In order to access the application more easily As a new user I want to authenticate using social media instead of having to provide a username and password
Feature: Authenticate using social media In order to access the application more easily As a new user I want to authenticate using social media instead of having to provide a username and password
Scenario: Login via LinkedIn Scenario: Login via Twitter
“Don’t take my word for it”
Feature: Authenticate using social media In order to access the application more easily As a new user I want to authenticate using social media instead of having to provide a username and password
Feature: Authenticate using social media In order to access the application more easily As a new user I want to authenticate using social media instead of having to provide a username and password
Scenario: Login via LinkedIn Scenario: Login via Twitter Scenario: Login via Facebook
“Don’t take my word for it”
Feature: Authenticate using social media In order to access the application more easily As a new user I want to authenticate using social media instead of having to provide a username and password
Feature: Authenticate using social media In order to access the application more easily As a new user I want to authenticate using social media instead of having to provide a username and password
Scenario: Login via LinkedIn Scenario: Login via Twitter Scenario: Login via Facebook
“Why are we building this anyway?”
Feature: Display customer details As a user I want to view the customer's profile details So that I can see the personal information on the customer
“Why are we building this anyway?”
Feature: Display customer details As a user I want to view the customer's profile details So that I can see the personal information on the customer
“Why are we building this anyway?”
Feature: Display customer details As a user I want to view the customer's profile details So that I can see the personal information on the customer
Feature: Locate a customerIn order to propose more relevant services to my customersAs a financial adviserI want to view a customer's profile details
“Why are we building this anyway?”
Feature: Display customer details As a user I want to view the customer's profile details So that I can see the personal information on the customer
Feature: Locate a customerIn order to propose more relevant services to my customersAs a financial adviserI want to view a customer's profile details
In order to propose more relevant services to my customers
What is the real business goal?
“Why are we building this anyway?”
Feature: Display customer details As a user I want to view the customer's profile details So that I can see the personal information on the customer
Feature: Locate a customerIn order to propose more relevant services to my customersAs a financial adviserI want to view a customer's profile detailsAs a financial adviser
What is the real business goal?
What is the context of the user who needs this feature?
“Why are we building this anyway?”
Feature: Display customer details As a user I want to view the customer's profile details So that I can see the personal information on the customer
Feature: Locate a customerIn order to propose more relevant services to my customersAs a financial adviserI want to view a customer's profile details
What is the real business goal?
What is the context of the user who needs this feature?
“Having the conversation is more important than recording the conversation is more important than automating the conversation”
- Liz Keogh
“No shit, Sherlock!”
Scenario Outline: User tries to log on to application with invalid credentials Given I am a registered user When I login as <username> with password <password> Then I should not be allowed to logon And I should see the error message <error-message> Examples: | username | password | message | | scott | | Please enter a password | | | tiger | Please enter a username | | scott | wrong | Invalid username or password |
“No shit, Sherlock!”
Scenario Outline: User tries to log on to application with invalid credentials Given I am a registered user When I login as <username> with password <password> Then I should not be allowed to logon And I should see the error message <error-message> Examples: | username | password | message | | scott | | Please enter a password | | | tiger | Please enter a username | | scott | wrong | Invalid username or password |
OK, but what else?
“How would you test this?”
Scenario: Find a customer by various criteria Given I am logged into the application When I click Search Then I will see search criteria options to search for the customer by customer name, date of birth, and account number
“How would you test this?”
Scenario: Find a customer by various criteria Given I am logged into the application When I click Search Then I will see search criteria options to search for the customer by customer name, date of birth, and account number
“How would you test this?”
Scenario: Find a customer by various criteria Given I am logged into the application When I click Search Then I will see search criteria options to search for the customer by customer name, date of birth, and account number
Scenario: Find a customer by name Given the following customers exist: | id | first name | last name | | 100 | Sarah-Jane | Smith | | 101 | Sarah | Smith | When I search for a customer using the following search criteria: | name | Sarah-Jane Smith | Then I should display the following customer: | id | first name | last name | | 100 | Sarah-Jane | Smith |
“How would you test this?”
Scenario: Find a customer by various criteria Given I am logged into the application When I click Search Then I will see search criteria options to search for the customer by customer name, date of birth, and account number
Scenario: Find a customer by name Given the following customers exist: | id | first name | last name | | 100 | Sarah-Jane | Smith | | 101 | Sarah | Smith | When I search for a customer using the following search criteria: | name | Sarah-Jane Smith | Then I should display the following customer: | id | first name | last name | | 100 | Sarah-Jane | Smith |
Well-defined inputs
“How would you test this?”
Scenario: Find a customer by various criteria Given I am logged into the application When I click Search Then I will see search criteria options to search for the customer by customer name, date of birth, and account number
Scenario: Find a customer by name Given the following customers exist: | id | first name | last name | | 100 | Sarah-Jane | Smith | | 101 | Sarah | Smith | When I search for a customer using the following search criteria: | name | Sarah-Jane Smith | Then I should display the following customer: | id | first name | last name | | 100 | Sarah-Jane | Smith |
Well-defined inputs
Well-defined outcomes
So why do BDD?
Delight your customers Reduce Waste Deliver faster and
more reliably Improve Visibility
So why do BDD?
Delight your customers Reduce Waste Deliver faster and
more reliably Improve Visibility
So why do BDD?
Delight your customers Reduce Waste Deliver faster and
more reliably Improve Visibility
So why do BDD?
Delight your customers Reduce Waste Deliver faster and
more reliably Improve Visibility
So why do BDD?
Delight your customers Reduce Waste Deliver faster and
more reliably Improve Visibility