84
Collaborate like you mean it! BDD in the world of Agile 2.0

BDD - Collaborate like you mean it!

Embed Size (px)

Citation preview

Collaborate like you mean it!BDD in the world of Agile 2.0

John Ferguson

Smart

Introductions“I help teams of smart people

learn to work together more efficiently, to deliver better software faster”

Do you aim to build features that delight the customer?

How long does it take a feature to go from an idea to into the hands of the users?

We can’t afford to wait for long dev cycles

Today’s market moves fast

Our delivery strategies need to move just as fast

Agile helps us meet these challenges

But are classic agile practices enough?

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 traditional way

BA

Developer

Tester

The traditional way

Story

BA

Developer

Tester

The traditional way

Story

Working code

BA

Developer

Tester

The traditional way

Story

Working code

boring manual testing

BA

Developer

Tester

The traditional way

Story

bug reports

Working code

boring manual testing

BA

Developer

Tester

The traditional way

Story

bug reports

Working code

boring manual testing

WASTE

BA

Developer

Tester

The BDD way

Story

The BDD way

Story

The BDD way

Story

The BDD way

Story

The BDD way

StoryExamples

The BDD way

StoryExamplesAutomated acceptance

criteria

The BDD way

Shared understanding

StoryExamplesAutomated acceptance

criteria

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

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

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

The BDD way

The BDD way

The BDD way

The BDD way

The BDD way

The BDD way

The BDD way

Collaborate like you mean it!

Show me the value!

“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?

Get everyone involved early

Create a Dynamic Tension

“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

Get up close and personal

Everyone is responsible for quality!

Communication is essential

Embrace Living Documentation

Embrace Living Documentation

Embrace Living Documentation

Embrace Living Documentation

Embrace Living Documentation

Embrace Living Documentation

Embrace Living Documentation

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

Questions?