how to write user stories - iiba vancouver...•writing user stories in an agile environment...

25
HOW TO WRITE USER STORIES (AND WHAT YOU SHOULD NOT DO) Stuart Ashman, QA Director at Mio Global Bob Cook, Senior Product Development Manager, Sophos

Upload: others

Post on 15-Jul-2020

10 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

HOWTOWRITEUSERSTORIES

(ANDWHATYOUSHOULDNOTDO)

StuartAshman,QADirectoratMioGlobalBobCook,SeniorProductDevelopmentManager,Sophos

Page 2: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

Welcome

Thispresentationwilldiscuss…• Writinguserstoriesinanagileenvironment• Writinguserstoriestofacilitategooddeveloperhabits• Writinguserstoriesfortestability• Writinguserstoriesthatresultinsuccessforthebusiness

Page 3: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

WhoWritesUserStories?

Needsthe“threeamigos”toworktogether• BusinessAnalyst/ProductManager• Developers• Testers

Mayhaveanadditional“amigo”forUX

Page 4: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

RoleandOwnership

BusinessAnalyst/ProductManager• CustomerorCustomerProxy• Ownstherequirements• Ownsthejustificationforrequirements• Ownsthedecisiontochangerequirements

Page 5: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

RoleandOwnership

Testers• Ownsthetestingartifactsandtools• Ownstheriskanalysisforbusinessdecisions• Doesnotowndecisions(andprobablyshouldn’t)

Developers• Ownstheimplementation• Doesnotownrequirements(andprobablyshouldn’t)

Page 6: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

(BA)Customer’sPerspective

• IwanttomakesureIgetwhatIwanted

• IwanttoensureIgetthatasquicklyaspossible

• IwanttobesurewhatIgetworkswell

• Iwanttoseeademofrequently

Page 7: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

Tester’sPerspective

• Iwanttoclearlyunderstandwhatisexpected

• Iwanttoclearlyunderstandwhatischanging

• So,thatIcanunderstandtherisksandhelpavoidormitigatethem

• Iwanttohelpprovewedeliveredwhatthecustomerwantedandthatwe’built’thatsolutionwell

Page 8: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

Developer’sPerspective

• Iwanttoclearlyunderstandwhatisexpected

• Iwanttodesignthebestsolutionthatmeetstheexpectations

• Iwanttodeliverthatsolutionefficiently

• IwanttogetfeedbackquicklytoknowIdidthiswell

Page 9: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

WhyDoWeWriteStories?

Ourspecieshasalwayssharedinformationthroughstories.Sciencetellsusthatourbrainsaremoreactiveandengagedwhenwehearortellanarrative.

Wemustengagethethree(orfour)“amigos”inclusivelyinastory

Page 10: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

EncouragingGoodDeveloperHabits

• Ensuringwetakethetimetoclearlyunderstandtherequirements

• Thinkingofanddesigningtestsbeforewedesignasolution(TDD)

• Engagingotherswithskillsinriskanalysisandtestdesigntoimprovethesolutiondesign

Page 11: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

EncouragingTestability

• Enablingtestfirstapproach

• Providingopportunitytopositivelyinfluencedesign

• Facilitatingautomation

Page 12: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

UserStoryExample#1

On-access scanner finds malware

• Malicious files should be blocked

• Clean files should not be blocked

• System response time should be unaffected

Page 13: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

UserStoryExample#1

Thingsthatarewrongwiththisstory:• Overlybroad;thisisaBIGtaskfordevelopers• Doesn’tdefine“malicious”vs.“clean”• Doesn’tdefine“block”• Unachievableperformancerequirements

Page 14: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

UserStoryExample#2

Button class gets Verify() method

• Works on square and round buttons

• Button code should check whether its active or inactive

• Return TRUE if active

• Return FALSE if inactive

Page 15: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

UserStoryExample#2

Thingsthatarewrongwiththisstory:• Nomeasurablecustomervalue• Developer–centric;noend-to-endfunctionality• Howcanyoutestthis(outsideofunittests)?

Page 16: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

UserStoryExample#3

API: CRUD API for Settings

• As an API user, I can retrieve, create, update and delete settings, so that I can set properties for viewing health reports

Page 17: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

UserStoryExample#3

Thingsthatarewrongwiththisstory:• Scopeistoobroad- 4APIendpointsorverbs• ImpliesweknowwhoorwhatanAPIuseris• Impliesweknowwhyweneedtocreate,read,updateordeletesettingsforhealthreports• Noindicationofconstraintsorlimitations– anylimitstohowmanysettings?• Impliesweknowwhatthesesettingsareandwhytheymatter

Page 18: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

AttributesofGoodUserStories

• Cleardefinitionofwhothecustomeris(who isthisfor)• Visibleandmeasurablecustomervalue(why theycare)• Cleardefinitionofrequirementsandconstraints(thewhat)• Clear“definitionofdone”(knowwhen wearedone)• Highleveldesignofthesolution(thehow)• Therightsizeandimpact• achievablewithinasprint• theappropriatethingtoworkonnow

Page 19: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

IndicatorsofBadUserStories(1/2)

• Noclearindicationofwhatwearebeingaskedtodeliver• Whothisisfor?• Whydo‘they’needit?• WhatdoesDONE looklike?• Howdoweverifyitdoeswhatwewant?• HowdoweverifyitdoesNOTdowhatweDON’Twant?

Page 20: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

IndicatorsofBadUserStories(2/2)

• Notclearwhatischanging• Insufficientdetailaboutuserimpacts• NospecificplanofAPIchanges

• Notclearwhattheeffectsofthechangemaybe• Whoelsemightbeaffected?Otherteams?• Lackofdiscussionformigration,upgradescenarios• Securityimplications?Performanceimplications?

Page 21: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

Storymap

• Buildingsignificantnewfunctionalityforanyproductrequiresmoreeffortthanasinglestoryinasinglesprint

• Likea“roadmap”goodstoryplanningshouldcreatea“storymap”• Seriesofstoriesthatlinktogetherintolargerfunctionality• Eachsubsequentstoryshouldaddincremental,end-to-end value• Needtobeawareofinter-storydependencies• Sometimesyoucandostoriesinparallel,andsometimesyoucan’t

Page 22: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

Storymapexample

Status Events Settings

Let’sBuildanewUserInterface!

Page 23: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

Storymapexample

BasicUI StatusTiles

EventsTab

SettingsTab

EventTypeC

EventTypeB

EventTypeA

SettingA

SettingB

SettingC

EventFilters

Page 24: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

Whatdidwecover?

• Thewho– 3(or4)“amigos”andtheirrolesandperspectives

• Attributesofgoodandbadstories

• Examples

• StoryMap

Page 25: HOW TO WRITE USER STORIES - IIBA Vancouver...•Writing user stories in an agile environment •Writing user stories to facilitate good developer habits •Writing user stories for

Questions?