Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

BDD

No description
by

Chad Furman

on 20 September 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of BDD

BDD
Front-to-Back
"Hey, I have a great idea for an app! It's like Uber for Snowplows."
Goal: Fulfilling 100 app-based snowplow requests this winter
S.M.A.R.T.
Specific, Measurable, Attainable, Relevant, Time-bound
Goal: Fulfilling 100 app-based snowplow requests this winter
Drivers
App Users
Moderators
Advertisers
Create account
low / high
Receive location-based notifications
medium / high
Review ratings
low / medium
Receive payment
high / high
Graduate payment tiers
high / medium
Login with Google
Track by location
medium / high
Purchase credits
high / high
Request a plow
medium / high
View Plows
low / medium
on live map
high / low
View ETA on plows
high / high
View Plow ratings
low / low
View Plow prices
medium / low
Rate drivers
low / high
Report
Audit reviews
low / high
Audit complaints against drivers
low / high
Manage price per region
low / high
Drive traffic to site
Link to app in web ads
Publish print ads
Track who came in from what ads
As a(n) [actor]
I want to [behavior]
To achieve [value]
Given ____
And ____
When ____
And ____
Then ____
But ____
Ubiquitous Language
Not business language, not programming language
Cucumber & Gherkin
Cucumber structures BDD testing
`features` folder holds the code
test runner
'Behat' is the PHP implementation

Gherkin formalizes language
Feature, Scenario, Given, ...
Example generation from data
Turns into features

Feature
: Location based notifications for plow drivers
As a plow driver
I want to receive notifications when a plow is requested in my area
To know where and when to plow


Scenario
: A user in my area requests a plow

Given
I am a plow driver in zipcode 01060

And
the user is in zipcode 01060

And
the request location was 102 west street, springfield MA

When
the user requests a plow

Then
I should be notified with:
'Plow request: 102 West Street, Springfield MA'

And
I should be able to accept the request


Scenario
: A user who is not in my area requests a plow

Given
I am a plow driver in zipcode 01060

And
the user is not in zipcode 01060

When
the user requests a plow

Then
I should not be notified

Code -- features/location_notify.feature
/**
* @Given /^the user is in zipcode (\d+)$/
*/
public function theUserIsInZipcode($arg1)
{
$this->user = User::whereZipCode($arg1)->limit(1);
}

/**
* @When /^the user requests a plow$/
*/
public function theUserRequestsAPlow()
{
$this->user->requestPlow();
}

Impact Mapping
Goal at the top
Fulfill 100 requests this winter through app
Identify actors who can impact the goal
Plow Drivers / Plow Requesters
Note behaviors of actors which impact the goal
Drivers are notified of requests in their zip
Add supporting activities defining the behavior
Push notification plays sound to alert driver
Value / Complexity assessments
(high complexity, high value) -- do these first
Gherkin Syntax
Feature: Some terse yet descriptive text of what is desired
In order to, As a, I want to... -- description is not parsed
Scenario: Some determinable business situation
Steps:
Given
,
When
,
Then
,
And
,
But
Given
steps set a known state for the When steps
Avoid talking about user interaction
A
Given
step with a tables argument can create DB records
When
is the state transition
The key action the user performs
Then
observes outcomes
Data was saved, this value is displayed, etc
Full transcript