scrum and bdd for developers with naveen kumar
TRANSCRIPT
Naveen Kumar Singh
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 companies including Xerox,Convergys, Cognizant and many more
Have been teaching and coaching multiple organizations on agile and engineeringpractices including Hays, Danfoss, KMG Infotech, Stryker, Robert Bosch, NCR Corporationand 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
WHAT WILL COVER HERE?
Impact Mapping Goal Impact
Story MappingDeliverables User Activities Features
Specification by Examples/BDD
User Stories Acceptance Criteria
Examples
Test First Source Code
WHAT’S NEEDED TO START SCRUM?
Problem Statement – Traffic jam in Dubai during pick hours
You as stakeholder - What can you do beside blaming government?
Simple solution - Are you Okay with Car Pooling?
What stopping you?
CAN 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 Profile
Logout
SOME SPLITTING TECHNIQUE
Split based on OPERATION
Share RidePublish New
RideView and Confirm
Modify Ride
Search all My ride
Delete 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 Favor
Credit 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
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
Ensure only valid data getting saved
Cancel should clear data so user can add new ride
Successful 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
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
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
THANK YOU!
Reach out to me if session was helpful
I Facilitate below workshop. [email protected]
Certified Scrum Developer (CSD) - Scrum Alliance
Product Discovery and Requirement Analysis
Test Driven Development (TDD)
Behavior Driven Development (BDD)
ICAgile Agile Testing and Test Automation
Professional Scrum Master (PSM) - Scrum.org
ICAgile DevOps Foundation
Professional Scrum Foundation (PSF) – Scrum.org