Agile Requirements Exploration: How Testers Add Value

81
Copyright 2016 : Lisa Crispin and Raji Bhamidipa9 With material from Janet Gregory, and from Discover to Deliver by Ellen Go6esdiener and Mary Gorman

Transcript of Agile Requirements Exploration: How Testers Add Value

Copyright2016:LisaCrispinandRajiBhamidipa9

WithmaterialfromJanetGregory,andfromDiscovertoDeliverbyEllenGo6esdienerandMaryGorman

Lisa(withJanetGregory):AgileTes/ng2009

MoreAgileTes/ng:2014@lisacrispin

www.lisacrispin.comwww.agiletester.ca

RajiBhamidipaJ

Soyouwanttobeascrummaster?2016www.raji.me@raji_bh

2

Whoaretesters?Whoarebusinessanalysts?Whoareprogrammers?Whoaremanagersofsomekind?AgileexperienceNew(lessthan6months)>6months>1year>5years>10years?

3

• Coffeebreak11–11:30•  Lunch13:00–14:15• Coffeebreak16:15–16:30•  Finishat18:00

4

•  Shareexperiences•  PracJcetechniquestoelicit,explore

specificaJons,buildsharedunderstanding•  Perhapssomebrandnewideas!•  Inspectandadaptaswego•  You’llleavewithsomeexperimentstotry

5

• TechniquesthatyourteamcanusetohelpyourcustomersidenJfytherightfeaturestobuild• Waystoenablesharedunderstandingoffeaturesandstories,andtesJngconsideraJons.

6

•  SmalldifferencescancausebigmispercepJons

• Theclassic“Jreswing”metaphor-eachstakeholderhasownviewpoint,agenda

8

What’sslowingyoudown?Gehnginthewayofsharedunderstanding?• WriteoneproblempersJckynote.•  Sharewithyourtablegroup.•  Postonyourwallchartbytheparachute.Grouprelatedproblems.

9

IntroReq’ts&TesJng

EssenJals

BigPictureRelease&

FeatureLevels

ExplorewithExamples

IteraJonLevelStories

-7dimensions-  funcJonal-  non-func’l-  quadrants

-  mindset-  levelsof

detail

-  Using7dimensions

-  Toolstohelp

-  ATDD-  Example

mapping

-  usingacceptancetests

Wrap-up

Wrap-UP

10Copyright2016:JanetGregory–DragonFireInc.

11Copyright2016:JanetGregory–DragonFireInc.

12

LevelsofPrecision

13

IntroReq’ts&TesJng

EssenJals

BigPictureRelease&

FeatureLevels

ExplorewithExamples

IteraJonLevelStories

-7dimensions-  funcJonal-  non-func’l-  quadrants

-  mindset-  levelsof

detail

-  Using7dimensions

-  Toolstohelp

-  ATDD-  Example

mapping

-  usingacceptancetests

Wrap-up

Wrap-UP

14

15

Meaning Descrip9on

I Independent Self-contained,sonoinherentdependencyonanotheruserstory

N NegoJable Canbechangedandrewri6enunJltheyareacceptedintoaniteraJon

V Valuable Relevantandnecessary;linkedtoabusinessgoal

E EsJmable Mustbeabletosize(oresJmate)thestory

S Small Smallenoughtohaveacertainlevelofcertainty

T Testable Mustbeabletotestit

Origins:BillWake,2003

func9onal

nonfunc9onal

www.DiscoverToDeliver.com/visual-language.php

Source: Discover To Deliver, Gottesdiener & Gorman, 2012

“anaspectofaproductthatexpressesproductcapabiliJesorthingstheproductmustdoforitsusers.”

-includesusers,acJons,dataandcontrolproductdimensions

EllenGo6esdiener,MaryGorman

17

agiletesJngquadrants(basedonBrianMarick’smatrix)

AmabléAutobustourbuscompany--seehandoutChooseafeature:1.  AbilitytoassignandschedulesubsJtutebuses

anddriversfortransporJngtourgroupsaroundMadrid

2.  AbilitytonoJfystaffatdesJnaJonwhenbusisbrokendown,alongwithaplanofacJon

19

20

As the scheduler,

I need to schedule regular ho

urs as

well as add additional hours f

or

overtime hours to the payroll system

So that the drivers get paid

correctly.

21

Dimension Ques9ons

User Isthescheduleranadministratorofthesystem?Orissheadataentrypersononly?

Data IsJmemeasuredinhoursorminutes?

AcJon Canthedriversaddtheirhoursinmanually,ordotheysubmitJmesheets?Howdoesshefindoutaboutextrahours?

Control DotheJmesheetshavetobeapprovedbyasupervisororsomebody?

Inyourgroup,usingyourfeature:1.  AskquesJonsaboutfuncJonal

requirementsforthedimensionyouhavebeengiven.

2.  WriteeachindividualquesJononasJckynoteandputontheDimensionswallchart.

22

“aspectsofaproductthatexpressproperJesthattheproductmusthave”-  includesenvironmentandinterface

dimensions-  Alsoknownas“non-funcJonal

requirements”or“para-funcJonalrequirements”

Go6esdiener,TheSoswareRequirementsMemoryJogger23

24

agiletesJngquadrants

26

As the scheduler,

I need to schedule regular ho

urs as

well as add additional hours f

or

overtime hours to the payroll system

So that the drivers get paid

correctly.

27

Dimension Ques9ons

Interface Who/whatelsehasaccesstotheschedulingsystem?

Environment Canitbeenteredremotelyorisitdesktoponly?

QualityA6ributes Arethereperformancerequirements?CanIassumethereisonlyonepersonaccessingataJme?Whatlevelofsecuritydoweneedforthescheduler?

Inyourgroup,usingthesamefeature…1.  AskquesJonsaboutqualitya6ributesfor

thedimensionyouhavebeengiven.2.  WriteeachindividualquesJononasJcky

noteandputwiththeDimensionwallchart.

28

29

IntroReq’ts&TesJng

EssenJals

BigPictureRelease&

FeatureLevels

ExplorewithExamples

IteraJonLevelStories

-7dimensions-  funcJonal-  non-func’l-  quadrants

-  mindset-  levelsof

detail

-  Using7dimensions

-  Toolstohelp

-  ATDD-  Example

mapping

-  usingacceptancetests

Wrap-up

Wrap-UP

30

LevelsofPrecision

Canbeusedatproductbackloglevelaswellasatstorylevel

• Helpsvisualiseausersjourneythroughtheproduct• Usefultoolforvisualisingproductbacklog

31

32

Wewillcreatea‘nowmap’.

Howdidyoustartyourdayandgetherethis

morning?

33

User Interface Action Data Control persona

user role map

context diagram

prototype

relationship map

business process diagram

capability map

dependency graph

story, story map

use case

value stream map

data model

state diagram

business policy, rule

decision table

decision tree

Source: Discover To Deliver, Gottesdiener & Gorman, 2012

35

As the scheduler,

I need to schedule regular ho

urs as

well as add additional hours f

or

overtime hours to the payroll system

So that the drivers get paid

correctly.

36

37

Name:SaritatheScheduler

SchedulesbusesSchedulesbusdriversMatchesbusdriverstobusesArrangesemergencybusesanddriversEnsureshoursgetloggedLiaiseswiththebusmaintenance

DetailedorientedLikesworkingwithnumbersLikestryingnewideas

Likestheoutdoors,campingIntrovertDoesn’tlikeconflict

DescripJon Values

Likes

38

Scheduleregularshiss

Scheduler

Driver

Payroll

Acceptsshiss

Reportshours

(includingoverJme)

Validateshours

Submitstopayroll

Createspayment

Drivergetspaid

39

Scenariosforpaymentofhours1.  Regularhoursonly2.  Regular,plusoverJme3.  Regular,plusaddiJoncall-outduetobus

breakdown4.  Call-outonlyduetobusbreakdown

40

41

Scenarios BusinessPoliciesRegularhoursonly Seasonalpart-JmehourspaidRegularplusoverJme OverJmeispaidat1.5xregularCall-outforbusbreakdown

AddiJonalcompensaJonforextracall

Considerpersonas,processflow,contextandstatediagramsforyourfeature,whatscenariosandbusinesspoliciescanyoufind.Pairup,eachpairtryatoolandreporttothegroup.Whatqualitya6ributesmightbeapplicableatthefeaturelevel?Considerall7dimensions.

42

43

• WriteoneitempersJckynote.•  Sharewithyourtablegroup.• Postonyourwallchartbytheracecar.

HowcanyouexplorefuncJonalrequirementsandqualitya6ributestoimprovequality?

44

IntroReq’ts&TesJng

EssenJals

BigPictureRelease&

FeatureLevels

ExplorewithExamples

IteraJonLevelStories

-7dimensions-  funcJonal-  non-func’l-  quadrants

-  mindset-  levelsof

detail

-  Using7dimensions

-  Toolstohelp

-  ATDD-  Example

mapping

-  usingacceptancetests

Wrap-up

Wrap-UP

Feature(with

examples) UserStory

High-LevelAT

FixDefects

Code,test&automatestory

ATDDAcceptanceTestDrivenDevelopment

AcceptStory Explore

Examples

45

•  Toelicitrequirements

•  Toreduceuncertainty•  Totestpeople’sunderstandingoftherequirement

46

CreditandthankstoBrianMarick

“That’snotright”canbemusictoyourears

• Canbecometheactualtests• AreaformofspecificaJon

47

As a user, I want guidelines to create a strong password, so that I have limited risk for identity theft

48

Copyright2016:JanetGregory–DragonFireInc.

1.  Pickapartnertablegroup2.  Usingtheblueindexcards,invent3secret

businessrulesfor“Createastrongpassword”story

3.  Write3(andonly3)examplesonthewhitecardstoexpressthoserules<2min>

4.  Nowpassthemtoyourpartnertable.5.  Guesstherulesbasedontheexamples–write

themonthesJckynotes,andpassthemback6.  Let’sstopandreflect

49

• Writemoreexamplestoclarifytherules–sJllnoconversaJonexceptyesorno.•  TwomoreiteraJons:Passexamplestoyour

partnertableandhavethemguesstherules.

Now:HaveaconversaJonaboutthestory.

50

Whatdidthisexerciseshowyou?

Whatdidyoulearn?

Arerulesorexamplesbe6er?Whyorwhynot?

51FromMaRWynne

Asauser,Iwantguidelinestocreateastrongpassword,sothatIhavelimitedriskforiden/tytheC

52

Story

Rules

Examples

QuesJons

1.  Minimum8,maximum32characters2.  Oneormoreofeach:lower-casele6er,

upper-casele6er,number,punctuaJonmark

Valid:p4ssW0rd!,paSSw.rDpInvalid:p4ssword1,p4ssw@d,Pa%swd.

Whatwordingtousefortheerrormessages?Shouldwehaveapasswordstrengthmeter?

53

Create a story from your feature,

write it on a yellow card.For example:•  Send email to hotel staff …•  Select an alternate bus …

Foryourstory,1.  IdenJfyacoupleofobviousbusinessrules

(bluecards)2.  Exploreexamplesforatleastonerule

(greencards)3.  AretherequesJons(pinkcards)

54

55

• WriteoneitempersJckynote.•  Sharewithyourtablegroup.• Postonyourwallchartbytheabyss.

Whatpizallsdoyouwanttohelpyourteamavoid?

56

IntroReq’ts&TesJng

EssenJals

BigPictureRelease&

FeatureLevels

ExplorewithExamples

IteraJonLevelStories

-7dimensions-  funcJonal-  non-func’l-  quadrants

-  mindset-  levelsof

detail

-  Using7dimensions

-  Toolstohelp

-  ATDD-  Example

mapping

-  usingacceptancetests

Wrap-up

Wrap-UP

57

LevelsofPrecision

Define,constrainorenablebehaviourofthesosware,businessprocesses,datastructure

58

Businessgoals

Businesspolicies

Businessrules

Itmayhelppriori/zestoriesExample:ScheduleadistributedteammeeJnginourschedulingapp.1.  MeeJngswith>2Madrida6endeesneeda

meeJngroom2.  Remotea6endeesmusthavevideolink3.  MeeJngsareduringnormalworkhoursfor

alla6endees(employeeslocatedacrossEurope).

59

• Wherecanyougetthedata?◦ DatadicJonary,model,fixtures• Whatkindofdatamightyouneed?•  Isthereappropriatetestdata?

60

• Meanstoevaluatecapabilityfromauser’sperspecJve• Providethescopeofthestory(orfeature)• Resultsareacceptedornotaccepted◦  Ifnot–revisit!

61

Scenarioexample:AsauserwithvalidlogincredenJals,Icanloginandseethelandingpage.Testmightlooklike:• GivenJanethasavalidlogin,• Whensheentershervalidusernameandpassword,•  Thensheseesthelandingpage.

62

User Email Password ExpectedResult

Comments

Jara [email protected] Passw0rd22 Loggedin Validloginscenario

63

As a driver called in as a

replacement,When I submit hours

including overtime, I

receive the correct pay

amount.

Rule:1.5xregularpayifmorethan1houroverscheduleddrivingJmeRule:1hourextrapayinaddiJontooverJmehoursifcall-inreplacement

BDD–BehaviourdrivendevelopmentCapturessharedunderstanding,guides

development.Given-precondiJonWhen–trigger,acJonThen–consequences,results

64

Story Asadrivercalledinasareplacement,WhenIsubmithoursincludingoverJme,Ireceivethecorrectpayamount.

Scenario RegularhoursplusoverJmepluscall-inreplacementpay

business rule(s) OverJmeiscalculatedas:(TotaldrivingJmeminusregularhours)*overJme

Given

pre-condition(s), state

Driverexistsanddrovehisbus

fixed data

Driver:José,worked40hours,including4overJmehourswhencalledinasareplacementRegularwage:20euros/hourOverJmepercentage:150%(1.5xregularpay)

When action Driversubmitshours

input data Hourssubmi6ed:36regular,4overJmecall-inreplacement

Then observable outcome: message, output

Totalwages:860

post-condition Paycheckcut

Given40hourshasbeenworkedinoneweekWhenthedriversubmitsoverJmehoursThenthedrivergetspaidforregularhoursplustheoverJmehours

Given40hourshasbeenworkedinoneweekWhenthedriversubmitsoverJmehoursThentheschedulersubmitstheregularhoursplustheoverJmehoursforpaymenttopayroll

Driver RegularWage

Regularhours

Over9mehours

Totalpaid

José 20.00 36.0 4.0 840.00

José 20.00 36.0 2.0 780.00

José 20.00 30.0 0.0 600.00

67

1.  Usethestoryfromyourexamplemapping2.  CreateBDDacceptancetestsusingGiven/

When/Thenformat3.  ThenidenJfypossibleexamples(testdata)

thatcouldbeinputinatabularformat4.  Showyourteststoanothertablegroup.Do

theyunderstandthecapabilitytobedelivered?

68

•  Interfaces◦  tesJngdesign–howdoesitinterfacewithotherapps?◦ Differentplazorms,consistency,howdoesitreact?

• Qualitya6ributes◦ Constraintstobeconsideredwitheverystory•  ImplementaJonenvironments◦ RequirementsthatlimitbuildanddeployopJons

69

• Considerthequalitya6ributes–arethereanythatareapplicabletoyourstory?• Arethereanyinterfacesyouneedtoconsider?• Whataboutyourenvironments?Anythingspecifictoworryabout?

Discussinyourteams

70

•  StoriesarearemindertohaveaconversaJon• Acceptancetestsagreeduponwiththecustomer◦ withexamplestoexpressbusinessrules• ConversaJon–examples,clarificaJons

RequirementStoryAcceptanceTestswithexamples

Conversa9on+ + =

71

72

• WriteoneitempersJckynote.•  Sharewithyourtablegroup.• Postonyourwallchartbytheabyss.

Whatexperimentscanyourteamtry?

73

IntroReq’ts&TesJng

EssenJals

BigPictureRelease&

FeatureLevels

ExplorewithExamples

IteraJonLevelStories

-7dimensions-  funcJonal-  non-func’l-  quadrants

-  mindset-  levelsof

detail

-  Using7dimensions

-  Toolstohelp

-  ATDD-  Example

mapping

-  usingacceptancetests

Wrap-up

Wrap-UP

74

Examples

Tests

Adaptedfrom:AgileAllianceFuncJonalTesJngToolsOpenSpaceWorkshop2007,&EBGConsulJng2012

75

LevelsofPrecision

Assembleop9ons

Source: Discover To Deliver, Gottesdiener & Gorman, 2012 76

77

Andalways,striveforquality!

photoshd.wordpress.com/2008/04/24/13/

AgileTes/ng:APrac/calGuideforTestersandAgileTeamsMoreAgileTes/ng:LearningJourneysfortheWholeTeamwww.agiletester.ca,www.lisacrispin.comEmail:[email protected]

79

Save35%:h6p://informit.com/swtesJngorh6p://informit.com/agiletestUsecodeAGILETESTING

Ques9ons?

• Go6esdiener,EllenandGorman,Mary,DiscovertoDeliver,2012• Wynne,Ma6,"IntroducingExampleMapping",h6p://bit.ly/1iw19w4• Wynne,Ma6andAslakHellesoy,TheCucumberBook:Behavior-DrivenDevelopmentforTestersandDevelopers,PragmaJcProgrammers,201• Adzic,Gojko,Specifica/onbyExample:HowSuccessfulTeamsDelivertheRightSoCware,Manning,2011• Adzic,Gojko,BridgingtheCommunica/onGap,NeuriLimited,2009

•  Gärtner,Markus,ATDDByExample:APrac/calGuidetoAcceptanceTest-DrivenDevelopment,Addison-Wesley,2012a•  Keogh,Liz,h6p://lunivore.com-lookforherpostsonBDD,RealOpJons

81