Outside In - Behaviour Driven Development (BDD)

Naresh Jain
Naresh JainTech Startup Founder at ConfEngine
Behavior Driven
 Development
      Naresh Jain
 naresh@agilefaqs.com
       @nashjain
  http://nareshjain.com

   Copyright © 2013, AgileFAQs. All Rights Reserved.
Warmup Scenarios
Pick one scenario and in relation to your scenario,
what are the specific observable results that will tell
you that the activity has been successfully
completed?
Going out for Movie (THX sound and Digital projection)
Going out for meal (one veg.)
Going shopping ($50)
                                                                              [5 Minutes]

Present back to the group your findings. [3 minutes per group]

                          Copyright © 2013, AgileFAQs. All Rights Reserved.
Commercial Break!
Copyright © 2013, AgileFAQs. All Rights Reserved.
Tech Talks!
Outside In - Behaviour Driven Development (BDD)
Product	
  Discovery	
  -­‐	
  Overview
                                                            Personas
Elevator       Business   Pragmatic            User
 Pitch          Goals     Personas             Goals
      Chartering
                                             Scenarios      Day in Life
                                                 &           of each
                                             Narratives      Persona


                           Story Mapping                      Activity
                                                               Map

                                             Interaction
                           UI Sketch                         Task Map
                                               Design

                                  Planning
                                              Grouping
                          Reiterating                       Prioritization
                                             by Themes

                                            User Story Authoring
                                           Acceptance          User
                                             Criteria         Stories
Vision
               Elevator                 Business
                Pitch                    Goals


                                                                      Goal
                       Chartering


                                                   Personas
Pragmatic                   User
Personas                    Goals

                                                                    Capability
                                                   Day in Life
                          Scenarios &
                                                    of each
                           Narratives
                                                    Persona



 Story Mapping
                                                                     Feature
                                                   Activity Map



 UI Sketch
                          Interaction
                            Design
                                                    Task Map
                                                                      Story
            Planning
                          Grouping by
 Reiterating

                                                                    Scenario
                                                   Prioritization
                           Themes


                           User Story Authoring
                          Acceptance
                                                   User Stories
                            Criteria

                                                                      Code
User Stories
What are we really trying to build?




      Copyright © 2013, AgileFAQs. All Rights Reserved.
What is a Story?


Story is a smallest piece of functionality that add business value
Stories should follow Ron Jeffries’ 3 Cs
Card – Placeholder for conversation
Conversation – Actual discussion between dev team and user
Confirmation – Acceptance criteria to determine when the story is finished




                      Copyright © 2013, AgileFAQs. All Rights Reserved.
Typical Story Format

       Story Title - Actor Action Context


In order to... <user goal/business justification>
As a .. <user who requires this feature>
I need .. <do something>




            Copyright © 2013, AgileFAQs. All Rights Reserved.
Story Example


Title: Keen Reader subscribes to a blog
In order to stay up-to-date with new posts
As a keen reader of your blog
I need to subscribe to your blog




                  Copyright © 2013, AgileFAQs. All Rights Reserved.
Another Story Example


Title: Social Networking Enthusiast uploads profile picture
In order for my friends to see how I look and recognize me
As a Social Networking Enthusiast
I need to upload my profile picture




                   Copyright © 2013, AgileFAQs. All Rights Reserved.
Stories are fundamental unit of activity

Business Goals                    Product Backlog                    Release Backlog                     Sprint Backlog




                    Inception
                                                       Release planning                 Iteration planning

 User Goals
                                As a ____, I want to                 As a ____, I want to               As a ____, I want to
                                 be able to ____ so                   be able to ____ so                 be able to ____ so
                                     that ____                            that ____                          that ____
                                                                                                                               Possible automation
                                                                                                                                of the acceptance
                                                                                                                                       test

                                                                      I will know this is                I will know this is
                                                                     done when _______                  done when _______
                     Might have an initial
                 estimate (perhaps for both
                 analysis and development),
                                                                                                                               Development team
                    and an expression of
                                                                                                                                 breaks out the
                   technical and business                                                                To do this I must:
                                                                                                                                 detail of work
                 confidence that this is real      More detailed estimate, and                          1)        _____
                                                                                                                               needed to pass test
                       and achievable               a specific acceptance test –                        2)        _____
                                                   low confidence stories might
                                                     be “spiked” or prototyped




                                                Copyright © 2013, AgileFAQs. All Rights Reserved.
What makes a good Story?

Stories should follow the INVEST principle:
Independent
Negotiable
Valuable
Estimateable
Small
Testable


                    Copyright © 2013, AgileFAQs. All Rights Reserved.
Scenarios
  Acceptance Criteria




Copyright © 2013, AgileFAQs. All Rights Reserved.
Scenario

Is a set of conditions that the Story must meet for it to be
accepted as complete
Is typically provided by the customer or product owner.


       Is not a replacement for conversation.
          Is the results of the conversation


               Scenarios are NOT tests

                Copyright © 2013, AgileFAQs. All Rights Reserved.
Writing Scenarios
Scenario should contain:
  ACTOR
  VERB – DESCRIBING A BEHAVIOR
  OBSERVABLE RESULT


To accommodate pre-conditions scenarios can be expressed as
               Given [Precondition]
               When [Actor + Action]
               Then [Observable Result]

                           Copyright © 2013, AgileFAQs. All Rights Reserved.
Example
Social Networking Enthusiast uploads profile picture
  Given the user has a valid facebook account and a digital picture on her computer,
  When she uploads a picture in facebook,
  Then her the picture should be visible to all her friends in her network.

  Given an user is trying to find a friend on facebook,
  When the user searches for a person using their name,
  Then their profile picture should be displayed along with other details.

  In order to keep facebook's reputation intact and stay out of legal hassles
  As owner of facebook,
  I need users to upload authentic, personal profile picture
                           Copyright © 2013, AgileFAQs. All Rights Reserved.
Cucumber Style BDD
Feature: Login
 In order to access secure content
 As a registered user
 I need to authenticate myself

 Scenario: Login with valid credentials
  Given I am not logged in
  When I try to login with "test" and "secret"
  Then I should be logged in

 Scenario: Login with invalid credentials
  Given I am not logged in
  When I try to login with "test" and "wrongpassword"
  Then I should not be logged in
  And I should be shown error message "Invalid username or password"
                       Copyright © 2013, AgileFAQs. All Rights Reserved.
Step Definition
Given /^I am not logged in$/ do
 browser.navigate_to("http://your_url.com")
end

When /^I try to login with "([^"]*)" and "([^"]*)"$/ do |username, password|
 browser.textbox("user").value = username
 browser.password("password").value = password
 browser.submit("Login").click
end

Then /^I should be logged in$/ do                 Then /^I should not be logged in$/ do
 if !browser.button("Logout").exists?              if !browser.submit("Login").exists?
   raise "Not logged in"                             raise "Logged in"
 end                                               end
end                                               end

Then /^I should be shown error message "([^"]*)"$/ do |msg|
 value = browser.div("errorMessage").text
 if value != msg
   raise "Incorrect message: #{value}"
 end
end
                                        Copyright © 2013, AgileFAQs. All Rights Reserved.
Acceptance Criteria & Tests: Definition
         Acceptance Tests

      Acceptance Criteria
+ Examples (data + scenarios)

     Acceptance Tests
            Copyright © 2013, AgileFAQs. All Rights Reserved.
Scenarios
       =
Executable Tests

   Copyright © 2013, AgileFAQs. All Rights Reserved.
Tasks
        Team members further break down each story into tasks that need
          to be completed to meet the acceptance criteria for the story.

To accomplish this story:
we start off with a simple upload and image display
restrict user to only upload certain image types (gif, jpg and png)
figure out where to store the image. (performant and fault-tolerant)
scale down (size, resolution, etc.) of the image
and so on...




                       Copyright © 2013, AgileFAQs. All Rights Reserved.
Demo



Copyright © 2013, AgileFAQs. All Rights Reserved.
BDD



Copyright © 2013, AgileFAQs. All Rights Reserved.
Key Questions

                    Business Facing


Are we building the right product?


Are we building the product right?

     Technology/Implementation Facing



       Copyright © 2013, AgileFAQs. All Rights Reserved.
Brian Marick’s Test Categorization

                                      Business Facing
Supports Programming




                                                                             Critique product
                       Technology/Implementation Facing



                         Copyright © 2013, AgileFAQs. All Rights Reserved.
It Helps to Think of Tests this way...

                                             Business Facing

                     Acceptance Testing                       Exploratory Testing
Drives Development




                                                                                        Critique product
                     Low-fi prototypes                        UI and Usability Testing

                                                                 Performance Testing
                        Unit Testing
                                                                     System Tests
                              Technology/Implementation Facing



                                Copyright © 2013, AgileFAQs. All Rights Reserved.
Inverting the Testing Pyramid
  Typical testing strategies lead to an inverted testing pyramid...




                               Manual Checking




                                  End-to-End
                                   GUI Tests                               80-90%



                                  Integration
                                                                   5-15%
                                     Tests


                                       Unit
                                       Tests       1-5%
               Copyright © 2013, AgileFAQs. All Rights Reserved.
Inverting the Testing Pyramid
                            GUI 1%
                            Tests                          Performance
                                                               Tests
                      End to End                    4%          Security
                      Flow Tests                                 Tests
                   One Layer Below GUI


               Workflow Tests                               6%


            Integration Test                                    9%


     Biz Logic Acceptance Tests                                      10%


                   Unit Tests                                              70%

         This is the need of the hours...
       Copyright © 2013, AgileFAQs. All Rights Reserved.
Test Driven Development

                                                                        Add a Test

                                                         Pass
                                                                       Run the Test

                                                                               Fail
TDD Rhythm - Test, Code, Refactor                                      Make a little
                                                                         change

                                                                                       Fail
                                                                       Run the Test
                                                                               Pass
                                                                         Refactor




                   Copyright © 2013, AgileFAQs. All Rights Reserved.
Behavior Driven Development
                                          Iteration

                                      Automated
                                    Acceptance Tests                                      P
         Scenario                                                                         E
                                                                                          R
                                                                                          F
                                                                                          O
                                                                                          R
Story           Automated                                                                 M
                 Unit Test                                                                E
                                                                                              T
                                                                           Automated UI   N
                                                                                              E
                                                                                          C
                                                                               Tests          S
                                                                                          E
                                                                                              T
                                                                                              S



                                      Automated
                                    Acceptance Tests


                                        Exploratory                          Scenario
                                          Testing

                       Copyright © 2013, AgileFAQs. All Rights Reserved.
Benefits of BDD



   Copyright © 2013, AgileFAQs. All Rights Reserved.
Why?




Copyright © 2013, AgileFAQs. All Rights Reserved.
Better Commitment and Buy-in
               Focus on Business Value




       Copyright © 2013, AgileFAQs. All Rights Reserved.
Ubiquitous Domain Language




      Copyright © 2013, AgileFAQs. All Rights Reserved.
Right focus




Copyright © 2013, AgileFAQs. All Rights Reserved.
Evolutionary Design




  Copyright © 2013, AgileFAQs. All Rights Reserved.
Breaking the Knowledge Silos in Distributed Team




               Copyright © 2013, AgileFAQs. All Rights Reserved.
Greater ROI




Copyright © 2013, AgileFAQs. All Rights Reserved.
Predictability & Confidence




      Copyright © 2013, AgileFAQs. All Rights Reserved.
Thank you
     Naresh Jain
naresh@agilefaqs.com


 Copyright © 2013, AgileFAQs. All Rights Reserved.
1 of 43

Recommended

ATDD - Acceptance Test Driven Development by
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentNaresh Jain
52K views179 slides
Mds customer insight tools by
Mds customer insight toolsMds customer insight tools
Mds customer insight toolsEntrepreneurship Tiga
867 views35 slides
Introduction to PubliVate - December 2010 by
Introduction to PubliVate - December 2010Introduction to PubliVate - December 2010
Introduction to PubliVate - December 2010PubliVate
285 views12 slides
Improving the innovation process with informal networks by
Improving the innovation process with informal networksImproving the innovation process with informal networks
Improving the innovation process with informal networksAndrea Pesoli
736 views29 slides
I am a Senior Developer, so now what? by
I am a Senior Developer, so now what? I am a Senior Developer, so now what?
I am a Senior Developer, so now what? Ionel Condor
668 views33 slides
Facilitating A C P S Session by
Facilitating A  C P S SessionFacilitating A  C P S Session
Facilitating A C P S SessionJohn Brooker / Yes! And...
450 views2 slides

More Related Content

What's hot

Cloud HR: clear flying or congested chaos? by
Cloud HR: clear flying or congested chaos?Cloud HR: clear flying or congested chaos?
Cloud HR: clear flying or congested chaos?Rob Scott
660 views18 slides
Welcome to Innovation Territory - ProductCamp Vancouver 2013 by
Welcome to Innovation Territory - ProductCamp Vancouver 2013Welcome to Innovation Territory - ProductCamp Vancouver 2013
Welcome to Innovation Territory - ProductCamp Vancouver 2013Cynthia DuVal
991 views15 slides
Adv prod tools assgn6 by
Adv prod tools assgn6Adv prod tools assgn6
Adv prod tools assgn6Susmita Pruthi
360 views12 slides
YEO Wee John. PR-Охота! "Brand. Brain. Communication" by
YEO Wee John. PR-Охота! "Brand. Brain. Communication"YEO Wee John. PR-Охота! "Brand. Brain. Communication"
YEO Wee John. PR-Охота! "Brand. Brain. Communication"prasu1995
559 views123 slides
HBT Solution - Part 2 of 6 by
HBT Solution - Part 2 of 6HBT Solution - Part 2 of 6
HBT Solution - Part 2 of 6STAG Software Private Limited
646 views7 slides
Working through Screens Idea Cards | www.FlashbulbInteraction.com/WTS.html by
Working through Screens Idea Cards  |  www.FlashbulbInteraction.com/WTS.htmlWorking through Screens Idea Cards  |  www.FlashbulbInteraction.com/WTS.html
Working through Screens Idea Cards | www.FlashbulbInteraction.com/WTS.htmlFlashbulb Interaction, Inc.
5.6K views116 slides

What's hot(9)

Cloud HR: clear flying or congested chaos? by Rob Scott
Cloud HR: clear flying or congested chaos?Cloud HR: clear flying or congested chaos?
Cloud HR: clear flying or congested chaos?
Rob Scott660 views
Welcome to Innovation Territory - ProductCamp Vancouver 2013 by Cynthia DuVal
Welcome to Innovation Territory - ProductCamp Vancouver 2013Welcome to Innovation Territory - ProductCamp Vancouver 2013
Welcome to Innovation Territory - ProductCamp Vancouver 2013
Cynthia DuVal991 views
YEO Wee John. PR-Охота! "Brand. Brain. Communication" by prasu1995
YEO Wee John. PR-Охота! "Brand. Brain. Communication"YEO Wee John. PR-Охота! "Brand. Brain. Communication"
YEO Wee John. PR-Охота! "Brand. Brain. Communication"
prasu1995559 views
Design Thinking Simplified by kristinshares
Design Thinking SimplifiedDesign Thinking Simplified
Design Thinking Simplified
kristinshares954 views
Merging media access 360 roi workshop gamification 3.0 by Scott Dodson
Merging media access 360 roi workshop   gamification 3.0Merging media access 360 roi workshop   gamification 3.0
Merging media access 360 roi workshop gamification 3.0
Scott Dodson594 views

Viewers also liked

Avatars of Test Driven Development (TDD) by
Avatars of Test Driven Development (TDD)Avatars of Test Driven Development (TDD)
Avatars of Test Driven Development (TDD)Naresh Jain
4.7K views34 slides
Inverting The Testing Pyramid by
Inverting The Testing PyramidInverting The Testing Pyramid
Inverting The Testing PyramidNaresh Jain
53.2K views46 slides
Behavior Driven Development by
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentLiz Keogh
41.3K views114 slides
Behavior Driven Development with Cucumber by
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with CucumberBrandon Keepers
28.4K views44 slides
An introduction to Behavior-Driven Development (BDD) by
An introduction to Behavior-Driven Development (BDD)An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)Suman Guha
7.5K views17 slides
Bdd Introduction by
Bdd IntroductionBdd Introduction
Bdd IntroductionSkills Matter
9.7K views35 slides

Viewers also liked(20)

Avatars of Test Driven Development (TDD) by Naresh Jain
Avatars of Test Driven Development (TDD)Avatars of Test Driven Development (TDD)
Avatars of Test Driven Development (TDD)
Naresh Jain4.7K views
Inverting The Testing Pyramid by Naresh Jain
Inverting The Testing PyramidInverting The Testing Pyramid
Inverting The Testing Pyramid
Naresh Jain53.2K views
Behavior Driven Development by Liz Keogh
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
Liz Keogh41.3K views
Behavior Driven Development with Cucumber by Brandon Keepers
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
Brandon Keepers28.4K views
An introduction to Behavior-Driven Development (BDD) by Suman Guha
An introduction to Behavior-Driven Development (BDD)An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)
Suman Guha7.5K views
Behavior Driven Development (BDD) by Ajay Danait
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)
Ajay Danait4.6K views
BDD presentation by temebele
BDD presentationBDD presentation
BDD presentation
temebele8.2K views
Scrum + Behavior Driven Development (BDD) - Colombo by Naveen Kumar Singh
Scrum + Behavior Driven Development (BDD) - ColomboScrum + Behavior Driven Development (BDD) - Colombo
Scrum + Behavior Driven Development (BDD) - Colombo
The WHY behind TDD/BDD and the HOW with RSpec by Ben Mabey
The WHY behind TDD/BDD and the HOW with RSpecThe WHY behind TDD/BDD and the HOW with RSpec
The WHY behind TDD/BDD and the HOW with RSpec
Ben Mabey7K views
Behavior Driven Development (BDD) and Agile Testing by dversaci
Behavior Driven Development (BDD) and Agile TestingBehavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile Testing
dversaci18.7K views
Practical Scrum with Kent Beck (SD Times Webinar) by Aslam Khan
Practical Scrum with Kent Beck (SD Times Webinar)Practical Scrum with Kent Beck (SD Times Webinar)
Practical Scrum with Kent Beck (SD Times Webinar)
Aslam Khan2K views
Session : Behaviour Driven Development & Cucumber at Agile Thailand 2016 by Tanjai Kongyuen
Session : Behaviour Driven Development & Cucumber at Agile Thailand 2016Session : Behaviour Driven Development & Cucumber at Agile Thailand 2016
Session : Behaviour Driven Development & Cucumber at Agile Thailand 2016
Tanjai Kongyuen585 views
Perl Behavior Driven Development (BDD) by Tudor Constantin
Perl Behavior Driven Development (BDD)Perl Behavior Driven Development (BDD)
Perl Behavior Driven Development (BDD)
Tudor Constantin2.6K views
Monkey See Monkey Do by Naresh Jain
Monkey See Monkey DoMonkey See Monkey Do
Monkey See Monkey Do
Naresh Jain12.2K views
Agile to the top 2016 (EN) by Luc Taesch
Agile to the top 2016 (EN)Agile to the top 2016 (EN)
Agile to the top 2016 (EN)
Luc Taesch790 views
Behaviour Driven Development by Richard Ruiter
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
Richard Ruiter569 views
Behavior Driven Development Pros and Cons by extentconf Tsoy
Behavior Driven Development Pros and ConsBehavior Driven Development Pros and Cons
Behavior Driven Development Pros and Cons
extentconf Tsoy750 views

Similar to Outside In - Behaviour Driven Development (BDD)

500 Startups Lean UX Bootcamp by
500 Startups Lean UX Bootcamp500 Startups Lean UX Bootcamp
500 Startups Lean UX BootcampEnrique Allen
5.8K views139 slides
Tour of UX deliverables - dev/haag by
Tour of UX deliverables - dev/haagTour of UX deliverables - dev/haag
Tour of UX deliverables - dev/haagPeter Boersma
2.4K views144 slides
solen user stories by
solen user storiessolen user stories
solen user storiesJustin Conner
214 views3 slides
Why UX Design Needs Content Strategy by
Why UX Design Needs Content StrategyWhy UX Design Needs Content Strategy
Why UX Design Needs Content StrategyKaren McGrane
17K views116 slides
Designing an MVP that works for users (2 and 1/2 hours) @Lean UX NYC 2013 by
Designing an MVP that works for users (2 and 1/2 hours) @Lean UX NYC 2013Designing an MVP that works for users (2 and 1/2 hours) @Lean UX NYC 2013
Designing an MVP that works for users (2 and 1/2 hours) @Lean UX NYC 2013Ariadna Font Llitjos
7.2K views55 slides
Change agile for XP Days 2012 benelux v1.0 by
Change agile for XP Days 2012 benelux v1.0Change agile for XP Days 2012 benelux v1.0
Change agile for XP Days 2012 benelux v1.0Ben Linders
3.3K views24 slides

Similar to Outside In - Behaviour Driven Development (BDD)(20)

500 Startups Lean UX Bootcamp by Enrique Allen
500 Startups Lean UX Bootcamp500 Startups Lean UX Bootcamp
500 Startups Lean UX Bootcamp
Enrique Allen5.8K views
Tour of UX deliverables - dev/haag by Peter Boersma
Tour of UX deliverables - dev/haagTour of UX deliverables - dev/haag
Tour of UX deliverables - dev/haag
Peter Boersma2.4K views
Why UX Design Needs Content Strategy by Karen McGrane
Why UX Design Needs Content StrategyWhy UX Design Needs Content Strategy
Why UX Design Needs Content Strategy
Karen McGrane17K views
Designing an MVP that works for users (2 and 1/2 hours) @Lean UX NYC 2013 by Ariadna Font Llitjos
Designing an MVP that works for users (2 and 1/2 hours) @Lean UX NYC 2013Designing an MVP that works for users (2 and 1/2 hours) @Lean UX NYC 2013
Designing an MVP that works for users (2 and 1/2 hours) @Lean UX NYC 2013
Change agile for XP Days 2012 benelux v1.0 by Ben Linders
Change agile for XP Days 2012 benelux v1.0Change agile for XP Days 2012 benelux v1.0
Change agile for XP Days 2012 benelux v1.0
Ben Linders3.3K views
庖丁解牛用户故事 (Splitting Your User Story) by Odd-e
庖丁解牛用户故事 (Splitting Your User Story)庖丁解牛用户故事 (Splitting Your User Story)
庖丁解牛用户故事 (Splitting Your User Story)
Odd-e1.1K views
The Straight Jacket of Agile Iteration by Michael Vax
The Straight Jacket of Agile IterationThe Straight Jacket of Agile Iteration
The Straight Jacket of Agile Iteration
Michael Vax5.4K views
500 Startups UX Bootcamp - Talk to your Effin Users by Rick Boardman
500 Startups UX Bootcamp - Talk to your Effin Users500 Startups UX Bootcamp - Talk to your Effin Users
500 Startups UX Bootcamp - Talk to your Effin Users
Rick Boardman825 views
More Elements of UX: real-world design deliverables by Peter Boersma
More Elements of UX: real-world design deliverablesMore Elements of UX: real-world design deliverables
More Elements of UX: real-world design deliverables
Peter Boersma2.7K views
Flotree customer centered vision by Dave Flotree
Flotree   customer centered visionFlotree   customer centered vision
Flotree customer centered vision
Dave Flotree494 views
Agile2012 uxd design mapping by drewz lin
Agile2012 uxd design mappingAgile2012 uxd design mapping
Agile2012 uxd design mapping
drewz lin396 views
The RTFM of Usability at LUXR June 2011 by Rick Boardman
The RTFM of Usability at LUXR June 2011The RTFM of Usability at LUXR June 2011
The RTFM of Usability at LUXR June 2011
Rick Boardman907 views
Lean UX Bootcamp @ 500 Startups - Intro to Usability by Rick Boardman
Lean UX Bootcamp @ 500 Startups - Intro to UsabilityLean UX Bootcamp @ 500 Startups - Intro to Usability
Lean UX Bootcamp @ 500 Startups - Intro to Usability
Rick Boardman2.3K views
Avoiding the 11th Hour Sh*storm at SxSW by Karen McGrane
Avoiding the 11th Hour Sh*storm at SxSWAvoiding the 11th Hour Sh*storm at SxSW
Avoiding the 11th Hour Sh*storm at SxSW
Karen McGrane14.6K views
Dubbawala _ Ebay Virtual Courier Aggregator by Manish Kanojia
Dubbawala _ Ebay Virtual Courier AggregatorDubbawala _ Ebay Virtual Courier Aggregator
Dubbawala _ Ebay Virtual Courier Aggregator
Manish Kanojia974 views
Grethe Thilly - Portfolio by Grethe Thilly
Grethe Thilly - PortfolioGrethe Thilly - Portfolio
Grethe Thilly - Portfolio
Grethe Thilly994 views
We are all content strategists now by Karen McGrane
We are all content strategists nowWe are all content strategists now
We are all content strategists now
Karen McGrane38K views

More from Naresh Jain

Problem Solving Techniques For Evolutionary Design by
Problem Solving Techniques For Evolutionary DesignProblem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary DesignNaresh Jain
842 views40 slides
Agile India 2019 Conference Welcome Note by
Agile India 2019 Conference Welcome NoteAgile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome NoteNaresh Jain
749 views25 slides
Organizational Resilience by
Organizational ResilienceOrganizational Resilience
Organizational ResilienceNaresh Jain
1.3K views79 slides
Improving the Quality of Incoming Code by
Improving the Quality of Incoming CodeImproving the Quality of Incoming Code
Improving the Quality of Incoming CodeNaresh Jain
624 views54 slides
Agile India 2018 Conference Summary by
Agile India 2018 Conference SummaryAgile India 2018 Conference Summary
Agile India 2018 Conference SummaryNaresh Jain
877 views19 slides
Agile India 2018 Conference by
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 ConferenceNaresh Jain
701 views21 slides

More from Naresh Jain(20)

Problem Solving Techniques For Evolutionary Design by Naresh Jain
Problem Solving Techniques For Evolutionary DesignProblem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary Design
Naresh Jain842 views
Agile India 2019 Conference Welcome Note by Naresh Jain
Agile India 2019 Conference Welcome NoteAgile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome Note
Naresh Jain749 views
Organizational Resilience by Naresh Jain
Organizational ResilienceOrganizational Resilience
Organizational Resilience
Naresh Jain1.3K views
Improving the Quality of Incoming Code by Naresh Jain
Improving the Quality of Incoming CodeImproving the Quality of Incoming Code
Improving the Quality of Incoming Code
Naresh Jain624 views
Agile India 2018 Conference Summary by Naresh Jain
Agile India 2018 Conference SummaryAgile India 2018 Conference Summary
Agile India 2018 Conference Summary
Naresh Jain877 views
Agile India 2018 Conference by Naresh Jain
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
Naresh Jain701 views
Agile India 2018 Conference by Naresh Jain
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
Naresh Jain818 views
Agile India 2018 Conference by Naresh Jain
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
Naresh Jain817 views
Pilgrim's Progress to the Promised Land by Robert Virding by Naresh Jain
Pilgrim's Progress to the Promised Land by Robert VirdingPilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert Virding
Naresh Jain385 views
Concurrent languages are Functional by Francesco Cesarini by Naresh Jain
Concurrent languages are Functional by Francesco CesariniConcurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco Cesarini
Naresh Jain497 views
Erlang from behing the trenches by Francesco Cesarini by Naresh Jain
Erlang from behing the trenches by Francesco CesariniErlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco Cesarini
Naresh Jain442 views
Anatomy of an eCommerce Search Engine by Mayur Datar by Naresh Jain
Anatomy of an eCommerce Search Engine by Mayur DatarAnatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur Datar
Naresh Jain1.5K views
Setting up Continuous Delivery Culture for a Large Scale Mobile App by Naresh Jain
Setting up Continuous Delivery Culture for a Large Scale Mobile AppSetting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Naresh Jain641 views
Towards FutureOps: Stable, Repeatable environments from Dev to Prod by Naresh Jain
Towards FutureOps: Stable, Repeatable environments from Dev to ProdTowards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
Naresh Jain671 views
Value Driven Development by Dave Thomas by Naresh Jain
Value Driven Development by Dave Thomas Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas
Naresh Jain2.4K views
No Silver Bullets in Functional Programming by Brian McKenna by Naresh Jain
No Silver Bullets in Functional Programming by Brian McKennaNo Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKenna
Naresh Jain774 views
Functional Programming Conference 2016 by Naresh Jain
Functional Programming Conference 2016Functional Programming Conference 2016
Functional Programming Conference 2016
Naresh Jain567 views
Agile India 2017 Conference by Naresh Jain
Agile India 2017 ConferenceAgile India 2017 Conference
Agile India 2017 Conference
Naresh Jain25.5K views
Unleashing the Power of Automated Refactoring with JDT by Naresh Jain
Unleashing the Power of Automated Refactoring with JDTUnleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDT
Naresh Jain623 views

Recently uploaded

Voice Logger - Telephony Integration Solution at Aegis by
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at AegisNirmal Sharma
17 views1 slide
Business Analyst Series 2023 - Week 3 Session 5 by
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5DianaGray10
165 views20 slides
RADIUS-Omnichannel Interaction System by
RADIUS-Omnichannel Interaction SystemRADIUS-Omnichannel Interaction System
RADIUS-Omnichannel Interaction SystemRADIUS
14 views21 slides
Empathic Computing: Delivering the Potential of the Metaverse by
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the MetaverseMark Billinghurst
449 views80 slides
How the World's Leading Independent Automotive Distributor is Reinventing Its... by
How the World's Leading Independent Automotive Distributor is Reinventing Its...How the World's Leading Independent Automotive Distributor is Reinventing Its...
How the World's Leading Independent Automotive Distributor is Reinventing Its...NUS-ISS
15 views25 slides
Roadmap to Become Experts.pptx by
Roadmap to Become Experts.pptxRoadmap to Become Experts.pptx
Roadmap to Become Experts.pptxdscwidyatamanew
11 views45 slides

Recently uploaded(20)

Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma17 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10165 views
RADIUS-Omnichannel Interaction System by RADIUS
RADIUS-Omnichannel Interaction SystemRADIUS-Omnichannel Interaction System
RADIUS-Omnichannel Interaction System
RADIUS14 views
Empathic Computing: Delivering the Potential of the Metaverse by Mark Billinghurst
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the Metaverse
Mark Billinghurst449 views
How the World's Leading Independent Automotive Distributor is Reinventing Its... by NUS-ISS
How the World's Leading Independent Automotive Distributor is Reinventing Its...How the World's Leading Independent Automotive Distributor is Reinventing Its...
How the World's Leading Independent Automotive Distributor is Reinventing Its...
NUS-ISS15 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman25 views
Understanding GenAI/LLM and What is Google Offering - Felix Goh by NUS-ISS
Understanding GenAI/LLM and What is Google Offering - Felix GohUnderstanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix Goh
NUS-ISS39 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi113 views
Black and White Modern Science Presentation.pptx by maryamkhalid2916
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptx
maryamkhalid291614 views
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor... by Vadym Kazulkin
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
Vadym Kazulkin70 views
Combining Orchestration and Choreography for a Clean Architecture by ThomasHeinrichs1
Combining Orchestration and Choreography for a Clean ArchitectureCombining Orchestration and Choreography for a Clean Architecture
Combining Orchestration and Choreography for a Clean Architecture
ThomasHeinrichs168 views
The Importance of Cybersecurity for Digital Transformation by NUS-ISS
The Importance of Cybersecurity for Digital TransformationThe Importance of Cybersecurity for Digital Transformation
The Importance of Cybersecurity for Digital Transformation
NUS-ISS25 views
DALI Basics Course 2023 by Ivory Egg
DALI Basics Course  2023DALI Basics Course  2023
DALI Basics Course 2023
Ivory Egg14 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb12 views
Spesifikasi Lengkap ASUS Vivobook Go 14 by Dot Semarang
Spesifikasi Lengkap ASUS Vivobook Go 14Spesifikasi Lengkap ASUS Vivobook Go 14
Spesifikasi Lengkap ASUS Vivobook Go 14
Dot Semarang35 views

Outside In - Behaviour Driven Development (BDD)

  • 1. Behavior Driven Development Naresh Jain naresh@agilefaqs.com @nashjain http://nareshjain.com Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 2. Warmup Scenarios Pick one scenario and in relation to your scenario, what are the specific observable results that will tell you that the activity has been successfully completed? Going out for Movie (THX sound and Digital projection) Going out for meal (one veg.) Going shopping ($50) [5 Minutes] Present back to the group your findings. [3 minutes per group] Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 4. Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 7. Product  Discovery  -­‐  Overview Personas Elevator Business Pragmatic User Pitch Goals Personas Goals Chartering Scenarios Day in Life & of each Narratives Persona Story Mapping Activity Map Interaction UI Sketch Task Map Design Planning Grouping Reiterating Prioritization by Themes User Story Authoring Acceptance User Criteria Stories
  • 8. Vision Elevator Business Pitch Goals Goal Chartering Personas Pragmatic User Personas Goals Capability Day in Life Scenarios & of each Narratives Persona Story Mapping Feature Activity Map UI Sketch Interaction Design Task Map Story Planning Grouping by Reiterating Scenario Prioritization Themes User Story Authoring Acceptance User Stories Criteria Code
  • 9. User Stories What are we really trying to build? Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 10. What is a Story? Story is a smallest piece of functionality that add business value Stories should follow Ron Jeffries’ 3 Cs Card – Placeholder for conversation Conversation – Actual discussion between dev team and user Confirmation – Acceptance criteria to determine when the story is finished Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 11. Typical Story Format Story Title - Actor Action Context In order to... <user goal/business justification> As a .. <user who requires this feature> I need .. <do something> Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 12. Story Example Title: Keen Reader subscribes to a blog In order to stay up-to-date with new posts As a keen reader of your blog I need to subscribe to your blog Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 13. Another Story Example Title: Social Networking Enthusiast uploads profile picture In order for my friends to see how I look and recognize me As a Social Networking Enthusiast I need to upload my profile picture Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 14. Stories are fundamental unit of activity Business Goals Product Backlog Release Backlog Sprint Backlog Inception Release planning Iteration planning User Goals As a ____, I want to As a ____, I want to As a ____, I want to be able to ____ so be able to ____ so be able to ____ so that ____ that ____ that ____ Possible automation of the acceptance test I will know this is I will know this is done when _______ done when _______ Might have an initial estimate (perhaps for both analysis and development), Development team and an expression of breaks out the technical and business To do this I must: detail of work confidence that this is real More detailed estimate, and 1) _____ needed to pass test and achievable a specific acceptance test – 2) _____ low confidence stories might be “spiked” or prototyped Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 15. What makes a good Story? Stories should follow the INVEST principle: Independent Negotiable Valuable Estimateable Small Testable Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 16. Scenarios Acceptance Criteria Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 17. Scenario Is a set of conditions that the Story must meet for it to be accepted as complete Is typically provided by the customer or product owner. Is not a replacement for conversation. Is the results of the conversation Scenarios are NOT tests Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 18. Writing Scenarios Scenario should contain: ACTOR VERB – DESCRIBING A BEHAVIOR OBSERVABLE RESULT To accommodate pre-conditions scenarios can be expressed as Given [Precondition] When [Actor + Action] Then [Observable Result] Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 19. Example Social Networking Enthusiast uploads profile picture Given the user has a valid facebook account and a digital picture on her computer, When she uploads a picture in facebook, Then her the picture should be visible to all her friends in her network. Given an user is trying to find a friend on facebook, When the user searches for a person using their name, Then their profile picture should be displayed along with other details. In order to keep facebook's reputation intact and stay out of legal hassles As owner of facebook, I need users to upload authentic, personal profile picture Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 20. Cucumber Style BDD Feature: Login In order to access secure content As a registered user I need to authenticate myself Scenario: Login with valid credentials Given I am not logged in When I try to login with "test" and "secret" Then I should be logged in Scenario: Login with invalid credentials Given I am not logged in When I try to login with "test" and "wrongpassword" Then I should not be logged in And I should be shown error message "Invalid username or password" Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 21. Step Definition Given /^I am not logged in$/ do browser.navigate_to("http://your_url.com") end When /^I try to login with "([^"]*)" and "([^"]*)"$/ do |username, password| browser.textbox("user").value = username browser.password("password").value = password browser.submit("Login").click end Then /^I should be logged in$/ do Then /^I should not be logged in$/ do if !browser.button("Logout").exists? if !browser.submit("Login").exists? raise "Not logged in" raise "Logged in" end end end end Then /^I should be shown error message "([^"]*)"$/ do |msg| value = browser.div("errorMessage").text if value != msg raise "Incorrect message: #{value}" end end Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 22. Acceptance Criteria & Tests: Definition Acceptance Tests Acceptance Criteria + Examples (data + scenarios) Acceptance Tests Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 23. Scenarios = Executable Tests Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 24. Tasks Team members further break down each story into tasks that need to be completed to meet the acceptance criteria for the story. To accomplish this story: we start off with a simple upload and image display restrict user to only upload certain image types (gif, jpg and png) figure out where to store the image. (performant and fault-tolerant) scale down (size, resolution, etc.) of the image and so on... Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 25. Demo Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 26. BDD Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 27. Key Questions Business Facing Are we building the right product? Are we building the product right? Technology/Implementation Facing Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 28. Brian Marick’s Test Categorization Business Facing Supports Programming Critique product Technology/Implementation Facing Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 29. It Helps to Think of Tests this way... Business Facing Acceptance Testing Exploratory Testing Drives Development Critique product Low-fi prototypes UI and Usability Testing Performance Testing Unit Testing System Tests Technology/Implementation Facing Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 30. Inverting the Testing Pyramid Typical testing strategies lead to an inverted testing pyramid... Manual Checking End-to-End GUI Tests 80-90% Integration 5-15% Tests Unit Tests 1-5% Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 31. Inverting the Testing Pyramid GUI 1% Tests Performance Tests End to End 4% Security Flow Tests Tests One Layer Below GUI Workflow Tests 6% Integration Test 9% Biz Logic Acceptance Tests 10% Unit Tests 70% This is the need of the hours... Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 32. Test Driven Development Add a Test Pass Run the Test Fail TDD Rhythm - Test, Code, Refactor Make a little change Fail Run the Test Pass Refactor Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 33. Behavior Driven Development Iteration Automated Acceptance Tests P Scenario E R F O R Story Automated M Unit Test E T Automated UI N E C Tests S E T S Automated Acceptance Tests Exploratory Scenario Testing Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 34. Benefits of BDD Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 35. Why? Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 36. Better Commitment and Buy-in Focus on Business Value Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 37. Ubiquitous Domain Language Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 38. Right focus Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 39. Evolutionary Design Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 40. Breaking the Knowledge Silos in Distributed Team Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 41. Greater ROI Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 42. Predictability & Confidence Copyright © 2013, AgileFAQs. All Rights Reserved.
  • 43. Thank you Naresh Jain naresh@agilefaqs.com Copyright © 2013, AgileFAQs. All Rights Reserved.