Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

20190110 story-splitting-and-automated-testing

76 views

Published on

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.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

20190110 story-splitting-and-automated-testing

  1. 1. 1/24/2019 1© Copyright Ariel Partners 2018
  2. 2. www.arielpartners.com Craeg Strong Software Development since 1988 Large Commercial & Government Projects Agile Coach / DevOps Engineer Kanban Trainer / SpecFlow Trainer Performance & Scalability Architect Certified Ethical Hacker New York & Washington DC Area CTO, Ariel Partners AKT, KMP, CSM, CSP, CSPO, ITILv3, PMI-ACP, PMP, LeSS, SAFe www.arielpartners.com cstrong@arielpartners.com @ckstrong1
  3. 3. User Story Splitting
  4. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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)
  16. 16. Test Automation
  17. 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)
  18. 18. www.arielpartners.com Comprehensive Testing Example GUI-Level Testing Test Selenium DB-Level Integrity Testing Data Base Test sqlUnit Unified Hierarchical Reporting Service-Level TestingjUnit Test Test Coverage Code-Level Testing Lint Notifications
  19. 19. www.arielpartners.com Different flavors of BDD © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394 External Specification Maintained Outside of Code Base Code Base Application Excel Sheet Wiki Page Textual Specification Maintained Within Code Base Code Base Specification Captured Directly In Source Code Code Base
  20. 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
  21. 21. VS. Good Gherkin versus Bad Gherkin
  22. 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. 23. Feature File BDD With SpecFlow 1. Write Feature Step Definitions 2. Generate Template 3. Fill In Code
  24. 24. www.arielpartners.com Functional Coverage Report All system functions expressed as features, split into user stories All user stories have acceptance criteria Each criterion translated to an automated test using structured English (Gherkin) Customized report matches epics and user stories to automated acceptance tests Test fails unless software is implemented correctly Links to Feature Documentation Generated via Pickles © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394
  25. 25. www.arielpartners.com Generating Documentation From Specifications © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394
  26. 26. www.arielpartners.com Scenario Outline Style-Gherkin © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394 Feature: Shipping cost calculation Scenario Outline: Calculate shipping costs Given I have <books> books in my basket And my shipping address is in <region> When I start the checkout process Then the shipping costs should be EUR <cost> Examples: | case | books | region | cost | | single book to EU | 1 | Europe | 7 | | two books to EU | 2 | Europe | 9 | | single book to US | 1 | US | 12 | @edge-case Examples: Edge cases | case | books | region | cost | | too many books | 10000 | Europe | 20005 | | zero books | 0 | Europe | 0 |
  27. 27. www.arielpartners.com Bad Gherkin: Team One © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394
  28. 28. www.arielpartners.com Bad Gherkin: Team Two © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394
  29. 29. www.arielpartners.com Bad Gherkin: Team Three © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394
  30. 30. www.arielpartners.com Bad Gherkin: Team Four © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394
  31. 31. www.arielpartners.com Gherkin Exercise: Team One © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394 As a user I want to input my feedback So that I can recognize a co-worker for their actions Acceptance Criteria • Both sender and receiver email must be filled in • One Corporate value (e.g. Integrity, Commitment, Courage, Excellence) must be filled in • A short, optional description may be filled in • I need to be able recognize someone even if they are not registered with the recognition system Key Examples • Leonard.mccoy@email.com recognizes an existing user spock@email.com for Integrity • Anthony.bourdain@email.com recognizes a new user andrew.zimmern@email.com for Commitment Create Recognition
  32. 32. www.arielpartners.com Gherkin Exercise: Team One (Hints) © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394
  33. 33. www.arielpartners.com Gherkin Exercise: Team Two © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394 As a manager I want the system to limit the number of times per week a user can recognize a co-worker So that a recognition is seen as valuable Acceptance Criteria • To send a recognition, both sender and receiver email must be filled in • To send a recognition, one Corporate value (e.g. Integrity, Commitment, Courage, Excellence) must be filled in • For each recognition, a short, optional description may be filled in • If a user has sent three recognitions this week, system should prevent user from entering a fourth Key Examples Limit Recognitions Per Week Sender Receiver Corporate Value Date Result Tom.Cruise@email.org Johnny.depp@email.org Commitment Monday 17 Oct 2016 ok Tom.Cruise@email.org Leonardo.DiCaprio@email.org Integrity Wed 19 Oct 2016 ok Tom.Cruise@email.org Brad.Pitt@email.org Respect Thur 20 Oct 2016 ok Tom.Cruise@email.org Robert.DowneyJr@email.org Courage Fri 21 Oct 2016 error
  34. 34. www.arielpartners.com Gherkin Exercise: Team Two (Hints) © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394
  35. 35. www.arielpartners.com Gherkin Exercise: Team Three © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394 As an administrator I want to maintain the set of corporate values for which a user can recognize a peer So that our corporate culture is aligned with the values we espouse Acceptance Criteria • Each corporate value consists of a one or two word title and a brief description • There must never be less than two corporate values • If a previously-existing corporate value is removed, existing recognitions are unaffected, but no new recognitions can be added with the removed corporate value Key Examples Maintain Corporate Values Corporate Value Description Integrity Always act honestly, ethically, and do the right thing even when it hurts Commitment Committed to the long term success and happiness of our customers, our people, and our partners Courage To take on difficult challenges, to accept new ideas, to accept incremental failure Excellence Always strive to exceed expectations and continuously improve
  36. 36. www.arielpartners.com Gherkin Exercise: Team Three (Hints) © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394
  37. 37. www.arielpartners.com Gherkin Exercise: Team Four © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394 As a user I want to see the most recent recognitions So that I can stay informed of the recognitions my peers are receiving Acceptance Criteria • Home page should display a list of all recognitions in the system • Each recognition should list the sender email, receiver email, corporate value, and date sent • The list of recognitions should show the most recent first, like the facebook feed • A user should be able to sort any column • A user should be able to show only recognitions for a particular corporate value (filter by corporate value) Key Examples Recognition Feed Sender Receiver Corporate Value Date Jaqen.Hghar@got.org Arya.Stark@got.org Excellence 10/12/2016 Jaqen.Hghar@got.org Arya.Stark@got.org Excellence 9/27/2016 Petyr.Baelish@got.org Sansa.Stark@got.org Courage 10/22/2016 Jaime.Lannister@got.org Cersei.Lannister@got.org Commitment 6/1/2016
  38. 38. www.arielpartners.com Gherkin Exercise: Team Four (Hints) © Copyright Ariel Partners 2016 *sales@arielpartners.com ((646) 467-7394
  39. 39. •KMP IIFebruary 4 & 5 •KMP IFebruary 9 & 10 •TKPFebruary 12 •KMP IIFebruary 23 & 24 •KMP IMarch 3 & 4 •KMP IIMarch 11 & 12 •KMP IMarch 23 -24 •TKPApril 2 •KMP IApril 15 & 16 •KMP IIApril 27 & 28 KMP II Kanban Management Professional This class focuses on the rollout, daily operation, and continuous improvement for a Kanban system. KMP I Kanban System Design Learn the Kanban Method and concepts of flow, pull and collaborative improvement TKP Team Kanban Practitioner Learn the basics of the Kanban Method NYC Kanban Class Schedule MONDAY & TUESDAY SATURDAY & SUNDAY TUESDAY SATURDAY & SUNDAY MONDAY & TUESDAY MONDAY & TUESDAY SATURDAY & SUNDAY TUESDAY MONDAY & TUESDAY SATURDAY & SUNDAY Weekday Location: 25 Broadway 12th Floor New York, NY 10004 Weekend Location: 835 Broadway Suite 1211 12th Floor New York, NY 10003 Learn more and Register arielpartners.com/training/kanban
  40. 40. Thank You Savant Financial Technologies, Inc. d/b/a Ariel Partners www.arielpartners.com @arielpartners

×