Behaviour-Driven Development (BDD) is a game changer for the whole team! Behaviour Driven Development is a powerful collaboration technique that can empower teams to deliver higher value features to the business faster and more effectively. More than just a testing technique, BDD is both a collaboration and a verification tool, and a vital step on the road to Continuous Delivery.
10. 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
11. 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
12. 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
13. 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
14. 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
28. The BDD way
Working code
and
Working Automated
Acceptance Tests
Shared
understanding
Story
Examples
Automated
acceptance
criteria
29. The BDD way
Working code
and
Working Automated
Acceptance Tests
Exploratory
testing, usability
testing...
Shared
understanding
Story
Examples
Automated
acceptance
criteria
30. The BDD way
BA and/or product owner
Tester Developer Automatable
Acceptance
Criteria
Shared
understanding
32. 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
33. 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
34. 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
47. “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
48. “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
49. “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
50. “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
51. “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
52. “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
53. “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
54. “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
55. “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 customer
In order to propose more relevant services to my customers
As a financial adviser
I want to view a customer's profile details
56. “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 customer
In order to propose more relevant services to my customers
As a financial adviser
I want to view a customer's profile details
In order to propose more relevant services to my customers
What is the real
business goal?
57. “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 customer
In order to propose more relevant services to my customers
As a financial adviser
I want to view a customer's profile details
As a financial adviser
What is the real
business goal?
What is the context of the
user who needs this feature?
58. “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 customer
In order to propose more relevant services to my customers
As a financial adviser
I 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?
59. “Having the conversation
is more important than
recording the conversation
is more important than
automating the conversation”
- Liz Keogh
60. “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 |
61. “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?
64. “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
65. “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
66. “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 |
67. “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
68. “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