workshop: behavior driven development - deliver value by naveen kumar singh
TRANSCRIPT
Professional Scrum Trainer (PST) at Scrum.Org
Works as consultant agile coach and facilitator in software development field
Facilitate Scrum.Org and Scrum Alliance Training workshop
20 years working experience in product as well as service companiesincluding Xerox, Convergys, Cognizant and many more
Have been teaching and coaching multiple organizations on agile andengineering practices including Hays, Danfoss, KMG Infotech, Stryker,Robert Bosch, NCR Corporation and many more
Strength – Demonstrable knowledge about Scrum, Kanban and Large-Scale Scrum (LeSS, Nexus, Spotify) with Technical practices such TDD,BDD, CI/CD, DevOps
Weakness – Don’t go by book and don’t like prescriptive frameworks
Don’t blame waterfall. We haven’t practiced it
New way is Agile way. But is this working for you?
Specification
Coding
Test cases
Testing
Deploy
Rework
So what to do?
Max 2 suggestions
per team 5
Mins
What Will cover here?
Goal Impact
Deliverables User Activities Features
User Stories Acceptance Criteria
Examples
Source Code
Scrum is nice but how to start delivering value?
What’s needed to start Scrum?
• Problem Statement – Traffic jam in Dubai during pick hours
• You as stakeholder - What you can do?
• Simple solution - Are you Okay with Car Pooling?
• What stopping you?
GOAL
• Let’s develop Car Pool Application
Registration Share Ride Book Ride Payment Review
Can we start development?
• Too big to develop and requirement is not yet clear?
• So what Next? Refinement
Registration Share Ride Book Ride Payment Review
Product Backlog Refinement
• When we refine? Couple of time before 1st
sprint and then continuous.
• Who do that? Product Owner and Development Team
• What we do? Understand, Split, Estimate and Order
• How to spilt? Is INVEST enough?
Some Splitting Technique
• Split based on WORKFLOW
Registration Signup Verification Login
LoginManage
ProfileLogout
Some Splitting Technique
• Split based on OPERATION
Share RidePublish New
Ride
View and
ConfirmModify Ride
Search all
My rideDelete Ride View Only
Some Splitting Technique
• Split based on RULES
Signup No Rules Only 18+Only IT
People
Only
Colombo
People
Some Splitting Technique
• Split based on DATA TYPE
PaymentReturn
FavorCredit Card Cash Card
Account
Transfer
Food
Coupon
Try splitting 2 per group
Signup VerificationManage
Profile
Publish New
Ride
Book Ride Review Credit Card Search Ride
10
Mins
SO CAN WE START SPRINT?
• We need acceptance criteria.
• Not more than 3-4 criteria for a story.
Acceptance Criteria
• Feature: Quick Post
• As a car owner I want to post my ride with minimum requirement so that anyone can register for it.
Acceptance Criteria – Why?
Define boundaries
Provide values to feature
Shared understanding
Help in derive tests
Help in knowing
when to stop
Acceptance Criteria
• Source:______________ Destination:________________
• Time:________________ #Seat available:_____________
• Name:_______________ Email:______________________
• Phone:_______________
Cancel Submit
Share Your Ride
Acceptance Criteria
• Feature: Quick Post
• As a car owner I want to post my ride with minimum requirement so that anyone can register for it.
Data must be searchable to book rideEnsure only valid data getting saved even as guest userCancel should clear data so user can add new rideSuccessful submission will redirect user on home page
Discussion of Acceptance Criteria
If(user==“new”
{
object = user
}
Else
error
We should encourage
employee to update
rides
Login -> Click on
“New” and enter test
data and then Result
&%$^&
Collaboration of 3 amigos
Technical
Feasibility
Happy Path
Exceptions, Test
Data, Boundary
Conditions
Developer Business Tester
Building right or right product?
Business Failure
Useless Stuff
Business Success
Technical Debts
Specification By
Example
Build it Right
Build the Right Things
What are Specifications by Example
Thin Slices of System Behavior
That Deliver Business Value
Described as concrete examples
That are potentially automatable
To create executable specifications
Captured in live documentation
Specifications By Collaboration
What are Specifications by Example
Given_________________
When_________________
Then__________________Gherkin
Given “Naveen” enter source “Office” and destination “Airport”
and time “5.30pm” with 2 seats available
And he provides his mail id “[email protected]” and
phone number “9810547500”
When Click on “Submit”
Then Display message “Ride Share” with “OK” button
And take “Naveen” to “home” page on click on “OK”
And his ride should be shown on top
Acceptance Criteria
• Feature: Quick Post
Successful submission will redirect user on home page
Given “Naveen” enter source “Office” and destination “Airport”
and time “5.30pm” with 2 seats available
And he provides his mail id “[email protected]” and
phone number “9810547500”
When Click on “Submit”
Then Display message “Ride Share” with “OK” button
And take “Naveen” to “home” page on click on “OK”
And his ride should be shown on top
Gherkin
Feature – Name of feature
Scenario – Behavior to be developed
Given – Pre-conditions
When – Actions to be performed
Then – Expected Result
And – Use for multiple Given, When & Then
But – Describe exception cases
Scenario Outline – Define multiple scenarios
Examples – Multiple Scenarios
Background – Avoid repeated Given
Can We start Sprint Now?
Why not? We have testable specification so let’s start
Let’s make a rule for team to have examples for every specification
If examples not available then specification will not get picked up for sprint
Convert examples in test is our first activity
Write enough code to pass those tests
Test First
Test
Code
Test Again
Refactor
Pass
Fail
Fail
Behavior Driven Development
BDD
Given Scenario
Then Expected Outcome
When Perform Action
Let’s get started
Write Feature to describe scenario in Gherkin
Eclipse, Java, Cucumber, Selenium, Junit
Create Test Runner class file
Generate Steps file
Write code to pass test
BDD - Characteristics
A testable story (it should be the smallest unit that fits in an iteration)
The title should describe an activity
The narrative should include a role, a feature, and a benefit
The scenario title should say what's different
The scenario should be described in terms of Givens, Events, and Outcomes
The givens should define all of, and no more than, the required context
The event should describe the feature
BDD - Lifecycle
3
5
Your Project Features Scenarios Steps
Your SystemAutomation
LibrarySupport Code
Step
Definitions
Technology
Facing
Business
Facing
Professional Scrum Foundation (PSF)
Professional Scrum Developer (PSD)
Professional Scrum Master (PSM)
professional Scrum product Owner (PSPO)
Scaled Professional Scrum (SPS)
Test Driven Development (TDD) Practitioner
Behavior Driven Development (BDD) Practitioner
Professional Agile Tester
Professional DevOps Consultant
Professional Lean Kanban Consultant
Extreme Programming (XP) Practitioner
GOLD SPONSORS
BRONZE SPONSOR SUPPORTER
MEDIA PARTNERS
SPONSORS & PARTNERS