Kanban Intersections with XP practices
Lean and Kanban are not ends in themselves; they are great for shining a light on bottlenecks and enabling an efficient flow of work to deliver business value. But how do we deal with those bottlenecks, anyway? How can we prevent them in the first place? How can we analyze our requirements better so we can understand the business value that we are supposed to be delivering?
This is where good XP Practices come in!
We will talk about story splitting and test automation.
With lots of examples and lessons learned to share, we hope to spark a lively discussion.
4. www.arielpartners.com
Why Split Stories?
• Our users ask for capabilities or “Features”
• Capabilities may take 2 days <-> 6 months to implement
• Ideally we want chunks of work 2 days <-> 5 days to implement
5. www.arielpartners.com
One Project Example
Identified
Feature
Starting Point
Delivered
Feature
Lengthy Delays
Lack of Visible Progress
Kanban Board not adding value
Difficult to Estimate
Difficult to Subdivide
Idea or
Request
Identified
Minimum
Marketable
Feature
User Story
User Story
User Story
Spike
Design
Spike
User Story
Delivered
Feature
Regular Visible Progress
Kanban Board tells a story
Small, estimable chunks
Independently valuable stories
Can assign work to multiple teams
To BeIdentified
Feature
6. www.arielpartners.com
Decomposing Features into User Stories…
Feature User Story
Relationship Parent Child
Effort 2 weeks to 4 months of
development
2 days to 2 weeks
Analysis Requirements Document As a/I want/So that
Possibly a UX mockup
Testing Test Plan (up to dozens of
tests)
2-12 Acceptance Criteria
Value to Business Immediately recognized as
independently valuable
Has value to the business,
but the value may be best
realized when combined
with other user stories split
out from the Feature
7. www.arielpartners.com
…and Spikes
User Story Spike
Goal Realize business value Reduce risk by answering a
question or gathering information
Effort 2 days to 2 weeks 2 days to 2 weeks
Completion Acceptance Criteria fulfilled Hypothesis is proven true or false
Next Steps Testing, Documentation,
Deployment
Discarded or recycled
8. www.arielpartners.com
Properly Formed User Stories
Splitting User Stories
1. Performance (ways to add caching or improved performance)
2. Simple to complex
3. Interface variations: excel, grid, graphical, mobile,
4. Variations in data: geographic region, or by refinery, or by customer
5. Operations: splitting out CRUD
6. Business rule variations
7. Workflow steps: this then that
8. Breakout a spike
INVEST
1. Independent
2. Negotiable
3. Valuable
4. Estimable
5. Small
6. Testable
User Story Components
1. “As a…” Identify the Stakeholder. More than one? Split!
2. “I want…” Identity the function the way the stakeholder would
3. “So that…” Identify the business value. What is the Stakeholder’s goal?
4. Acceptance Criteria
1. Assumptions
2. Invariants
3. Pre- and Post-Conditions
http://agileforall.com/wp-content/uploads/2018/02/Story-Splitting-Flowchart.pdf
9. User Story Workshop
As a Worker
I want the system to automatically associate newly available scanned documents with a pending task that is currently assigned to me in a SNAP
eligibility case
So that I don’t have to manually search the repository for documents needed for the case, and potentially miss important new documents
Acceptance
Criteria
1. Given a SNAP eligibility case with a pending task, when a new scanned document having a case number that matches appears in the
repository, then the system should associate a new scanned document to that task so that it is displayed when the task is accessed
2. Given a SNAP eligibility case with no pending tasks, when a new scanned document having a case number that matches appears in the
repository, then the system should not create a new task or modifying any existing tasks
As a [SYSTEM]
I want to associate scanned documents with pending tasks in the application
So that documents are recognized and alerts can be given to users at assignment/task start
Acceptance Criteria For a case with a pending task, the scanned document is recognized
As a Worker
I want the system to send me a notification when a scanned document is associated with a task that is currently assigned to me in a SNAP
eligibility case
So that I know immediately that a previously blocked task might be ready for processing, so I can process the task timely
Acceptance
Criteria
1. Given a SNAP eligibility case with a pending task assigned to me, when a new scanned document is associated to the task, then the
system should display an alert notification
2. Given a SNAP eligibility case with a pending task that was assigned to me but which is no longer assigned to me, when a new scanned
document is associated to the task, then the system should not display an alert notification
One user story is actually two
Food Stamps (SNAP) Eligibility Processing Application
10. User Story Workshop
As a Internal affairs bureau officer
I want to view a complete list of an officer’s promotions for an officer who may be the subject of an investigation
So that I can cross-reference dates of any complaints against promotion dates, to understand if previous complaints were handled appropriately
Acceptance
Criteria
Given I am logged in as an IAB officer, when I view an officer’s profile and select history, then I should see a list of promotion dates and
complaints listed in date order
As a Authorized user
I want To view an audit trail of an officer’s promotions
So that
Acceptance Criteria
As a Shelter provider scheduler
I want To view a list of an officer’s promotions
So that I can understand the officer’s seniority better while scheduling rotations for duty at a homeless shelter
Acceptance
Criteria
Given I am logged in as a shelter provider scheduler and an officer who is assigned to my shelter, when I view the officer’s profile and
select history, then I should see a list of promotion dates
By not specifying the
business value we may miss a
very important use case
Crime Prevention Application For Homeless Shelters
11. www.arielpartners.com
Example #1: EBITDA
Story Compute operating income component of EBITDA by company
Story Compute Income Tax component of EBITDA by company
Story Compute Depreciation component of EBITDA by company
Story Compute Interest component of EBITDA by company
Story Compute Amortization component of EBITDA by company
Story Compute EBITDA by company combining component calculations
Story Control Access to EBITDA calculations by company
Story Reconciliation report to compare EBITDA in AO report to BPC P&L
statement
Story Schedule report to enable reconciliation during close
MMF Description
EBITDA Calculations by Company – for
Accounting and Reporting Team
Earnings before interest taxes depreciation and amortization
12. www.arielpartners.com
Example #2: Trader Checkout Process
Story Basic read-only details view for trader for formula
tablet
Similar to existing report, but omits trades already
approved or rejected, activated or pending. Most
trades have formula tablets
Story Trader can approve or reject deal details
Story Trader can only approve/reject their own trades
Story Read-only form for middle office to review rejected
details
Story Force modified deals to be re-approved
Story Update historical deal details so I don’t have to
approve them
Spike Determine how fixed price tablets will be displayed Small percentage of trades have fixed price tablets
Story Support fixed price tablet support for TCM view
MMF Description
New Trader Checkout Process (TCM) For Audit To prevent booking errors, have traders explicitly approve or reject
trades on a daily basis before they are activated
13. www.arielpartners.com
Example #3: Audit Dashboard
Story Test1: Internal dashboard for the same parking and
posting user
The very easiest check is first. This checks to ensure
the same use hasn’t entered the transaction and
approved the transaction, with a very simple
dashboard output
Story Test2: Internal dashboard for user posting three or
fewer entries
Normally users who are authorized are posting many
entries. Three or fewer would be highly unusual and
may indicate unauthorized activity.
Story Test3: Duplicate journal entry transactions posted to
the same account, same amounts, in same period
Story Test4: Entries less than $100
Story Test5A: Capture history of every assignment and un-
assignment
Story Test5B: Dashboard for non-authorized user
MMF Description
Internal audit dashboard 1st phase, top 5 tests To prevent compliance issues, automate the top-5 compliance spot
checks and run them on a regular basis
Simple queries for 1-4 already available in the
DW.
Data for test #5 not yet available.
We turned development of query5 into its own
story
14. www.arielpartners.com
Example #4: Send ”HighFive” Recognition
MMF Description
I want to recognize a co-worker In order to immediately recognize a co-worker for a job well done, I
want to send them a high-five.
1. Manual
Entry of
Email
2.
Dropdown
4. Type-
Ahead
3. Don’t
Show My
Email
15. www.arielpartners.com
Parallel Parent[Feature] and Child[User Story] Work
Child Stories Created
When Feature
Analysis Begins
“Ready” User Stories
Can Be Completed
Anytime
Additional User
Stories Created As
Needed During
Feature Analysis &
Design
Spikes Created As
Needed
Finish-to-Finish Dependency (Feature to Child Story)
17. www.arielpartners.com
Automated Acceptance Tests
80% of the solution, 20% of the Effort
Unit Tests As Needed
Automated Acceptance
Tests (BDD)
Manual Exploratory Testing
Specialized Tests
(Performance&
Security)
20. Gherkin: The Language of BDD
Scenario
Given [Context]
And [More Context]
When (<role> does) [Action]
And [Other Action]
Then (<role> should see) [Outcome]
And [More Outcomes]
Scenarios
=
Test Cases
=
Acceptance Criteria
22. Bad versus Good Gherkin
Happy Path Should
be First
Boundary condition does
not match scenario
Show me, don’t tell me.
Should be an example
GUI Display Detail makes
this brittle. What if we
change it to a bar chart?
This data is already
grouped. Use the
user’s language not
technical language
More GUI Details,
not necessary
?Why
Different?
23. Feature File
BDD With SpecFlow
1. Write
Feature
Step Definitions
2. Generate
Template
3. Fill In
Code
Question:
Why did I include the Organization Name in the “THEN” but not in the “WHEN”? What does that indicate about the system?
For the new user example, why did I change the field name from “Receiver Email” to “New User Email”? What might that indicate about the system?
Why isn’t there an organization name included in the new user’s information? What does that imply? (that I can only recognize my peers who are within my same organization)
What other features or scenarios or questions are implied by this?
Probably there should be some sort of lookup for who I want to recognize, and that lookup feature needs to be specified.
There must be some way to manually type in a receiver if I can’t find them in the lookup, and that is how the system knows it is a new user and not an existing user
There should be some way of letting the new user know that they are now in the system– for example, sending them an email with a link to log in to the system to receive their recognition
Is the system capturing separately first name and last name? Or is it capturing name and then parsing out the first name and last name?
Question:
Is the maximum number of recognitions per week configurable?
Why did I leave out the Sender email column in the examples? Would it be ok to leave it in?
What other features or scenarios or questions are implied by this?
Probably there should be some sort of administrative feature to maintain the maximum number of recognitions
Should we show the user the number of recognitions they have sent this week in the GUI, so they are aware of their budget?
Questions
What about the GUI? Shouldn’t the scenario specify that the button for deleting a corporate value is missing if there are only two values present?
Answer: yes, that is a case where we would add a test via Selenium, either thru SpecFlow or CucumberJS depending on the web technology stack
Why did I add the role in the table data for the logged in user, rather than mention it in the text?
Answer: for code reuse; this way we can reuse the same piece of code for multiple users
Why did I capture the type of message in table data rather than the text?
Answer: for code reuse; imagine when we get multiple messages back, some warnings and some errors. This way the same piece of code can be used
Update this slide with your own trainer name. Update the slide master with the trainer contact info in the footer, no organization name/logo unless you have a Training Organization License.