Behavior Driven Development For Mobile Apps
Using Specflow & Xamarin Test Cloud
Geert van der Cruijsen
Lead Consultant Xpirit
@geertvdc
http://mobilefirstcloudfirst.net
gvandercruijsen@xpirit.com
Behavior Driven Development
WHAT WHY HOW
Behavior Driven Development
WHAT
Behavior Driven Development
Business
$
Business
$
Developer
{ }
Business
$
Developer
{ }
Product
{ }
Business
$
Developer
{ }
Product
{ }
Months
Business
$
Developer
{ }
Product
{ }
WeeksMonths
Business
$
Developer
{ }
Product
{ }
Weeks
Examples
Business
$
Developer
{ }
Product
{ }
Weeks
Examples
BDD
Business
$
Developer
{ }
Product
{ }
Weeks
Examples
BDD
Ubiquitous
Language
Business
{$}
Developer
{$}
Product
{$}
Weeks
Examples
BDD
Ubiquitous
Language
Business Developer Product
Weeks
Examples
BDD
Ubiquitous
Language
DDD
{$} {$} {$}
What is Behavior Driven Development
BDD is a process designed to aid the management and the delivery of
software development projects by improving communication between
engineers and business professionals. In so doing, BDD ensures all
development projects remain focused on delivering what the business
actually needs while meeting all requirements of the user.
BDD is an evolution in the thinking behind Test Driven Development and
Acceptance Test Driven Planning. BDD is also referred to as specification
by example.
What is Behavior Driven Development
BDD is a process designed to aid the management and the delivery of
software development projects by improving communication between
engineers and business professionals. In so doing, BDD ensures all
development projects remain focused on delivering what the business
actually needs while meeting all requirements of the user.
BDD is an evolution in the thinking behind Test Driven Development and
Acceptance Test Driven Planning. BDD is also referred to as specification
by example.
What is Behavior Driven Development
BDD is a process designed to aid the management and the delivery of
software development projects by improving communication between
engineers and business professionals. In so doing, BDD ensures all
development projects remain focused on delivering what the business
actually needs while meeting all requirements of the user.
BDD is an evolution in the thinking behind Test Driven Development and
Acceptance Test Driven Planning. BDD is also referred to as specification
by example.
3 Amigos
Product Owner Developer Tester
3 Amigos
Product Owner Developer Tester
3 Amigos
Product Owner
Developer
Tester
WHY
Behavior Driven Development
26% of installed apps are abandoned after the first use
Google 2015
The average Android app loses 77% of its daily active
users within the first three days after the install, and
90% within the first 30 days Quettra 2015
Mobile App
Quality
is important
Why Behavior Driven Development
Why Behavior Driven Development
HOW
Behavior Driven Development
Writing examples in Gherkin
Feature: feature title
As a [role]
I want [feature]
So that [benefit]
Scenario:
Scenario 1: Title
Given [context]
And [some more context]...
When [event]
Then [outcome]
And [another outcome]...
Writing examples in Gherkin
Feature: feature title
As a [role]
I want [feature]
So that [benefit]
Scenario:
Scenario 1: Title
Given [context]
And [some more context]...
When [event]
Then [outcome]
And [another outcome]...
Writing examples in Gherkin
Feature: feature title
As a [role]
I want [feature]
So that [benefit]
Scenario:
Scenario 1: Title
Given [context]
And [some more context]...
When [event]
Then [outcome]
And [another outcome]...
Writing examples in Gherkin
Feature: feature title
As a [role]
I want [feature]
So that [benefit]
Scenario:
Scenario 1: Title
Given [context] //Arrange
When [event] //Act
Then [outcome] //Assert
Writing examples in Gherkin
Feature: Get weather for location
As a person who has to go outside sometimes
I want to retrieve todays weather
So that I know I should bring an umbrella
Writing examples in Gherkin
Scenario 1: Get weather for manually
added location
Given I opened the app
When I enter “Amsterdam” as the location
When I press the “Get Weather” button
Then the temperature in Amsterdam should be
shown
How to do BDD?
Gherkin Cucumber for .NET
Let’s see this in action
DEMOGithub.com/geertvdc/BDDXamarin
Conclusion
BDD helps building software that matters
Specflow, Xamarin & Testcloud are
a great way to implement BDD for mobile apps
Conclusion
Thank you!
Geert van der Cruijsen
@geertvdc
http://mobilefirstcloudfirst.net
gvandercruijsen@xpirit.com
Github.com/geertvdc

Behavior driven development for Mobile apps

Editor's Notes

  • #8 Cost of translation
  • #9 Cost of translation Waterfall projects could take months even years to get good feedback Little test: lets say we’re building a weather appi’m the product owner and you are the developers in the development team.
  • #15 Testers also included in thei picture and they should work together with business and developer to create good specs.
  • #16 3 different roles 3 different artifacts This is the power of BDD
  • #20 PO uses specs in word Developer creates code and unit tests Tester creates test plans Word files don’t break the build
  • #21 PO uses specs in word Developer creates code and unit tests Tester creates test plans Word files don’t break the build
  • #24 Mobile app market is really competitive Apps are quite complex. Offline data, animation heavy UI,
  • #25 Mobile app market is really competitive Apps are quite complex. Offline data, animation heavy UI,
  • #27 First time right Get feedback as soon as possible
  • #31 GIVEN WHEN THEN Behind each line we can add a piece of testable code (unit test)
  • #32 GIVEN WHEN THEN Behind each line we can add a piece of testable code (unit test)
  • #35 https://github.com/mikeyjones/SpecFlow https://marketplace.visualstudio.com/items?itemName=TechTalkSpecFlowTeam.SpecFlowforVisualStudio2013