Requirements are King – Better Requirements = Better Software

Post on 16-Apr-2017

128 views 0 download

Transcript of Requirements are King – Better Requirements = Better Software

World®’16

RequirementsareKing– BetterRequirements=BetterSoftwareBenjaminJohnson-Ward– SeniorConsultant,Presales– CATechnologies

DO5X23E

DEVOPS

2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ForInformationalPurposesOnlyTermsofthisPresentation

©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.

Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.

3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Abstract

Countlessresearchandcasestudieshavelongpointedtoacold,hardtruth:therequirements,notdevelopersortesters,introducethevastmajorityofdefectsthatwreakhavocinproduction.Ratherthansolvethisissue,thedevelopmentpracticesthathavearisenaround“Agile”haveintroducedanewchallenge,astestershavetopiecetogetherandreacttoaconstantbarrageofdisparateuserstoriesandchangerequests.What’smore,therequirementsremainstatic,sothattestershavetomanuallyconvertthemintotests.Thisisaslow,unsystematicprocess,whichcreatesdefectswhentheambiguousrequirementsaremisinterpreted.Inorderfortestinganddevelopmenttokeepupwithconstantlychanginguserneeds,requirementsmustbecapturedinaformatwhichminimizesmiscommunication,canreacttochange,andenablessubsequenttestassetstobederivedautomatically.§ Thissessionwillsetouthow“active”flowchartmodellingcan:§ Provideaformatalreadyfamiliartobusinessanalyststocaptureuserneeds§ Provideaformatfortesterstogenerateoptimizedtestcases,testscripts,dataandexpectedresults

automatically.§ AutomaticallyreflectchangesmadetotherequirementsinthetestsassetsInthisrequirements-drivenapproach,testingtherebybecomesalargelyautomatedcomparisonofhowasystemshouldfunctiontothesystemthathasbeendelivered.

BenjaminJohnson-WardCATechnologiesSeniorConsultant,Presales

4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Agenda

WHATISAREQUIREMENT?

WHYFOCUSONREQUIREMENTS?

Q&A

HOWABOUTSOFTWAREENGINEERING?

HOWABOUTREQUIREMENTSENGINEERING?

INTRODUCINGTHEREQUIREMENT-DRIVENAPPROACH

1

2

3

4

5

6

5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhatisaRequirement?

6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Definition:Requirement

Requirement:singulardocumentedphysicalandfunctionalneed thataparticulardesign,product

orprocessmustbeabletoperform.

ISO/IEC/IEEE29148:2011

Wikipedia

Requirement:statementwhichtranslatesorexpressesaneed anditsassociatedconstraintsand

conditions.

7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhatisaRequirement?

ErikSimmons,nuCognitive,“21st CenturyRequirements”,11/08/11

Arequirementisastatementof:

1. Whatasystemmustdo(functionalrequirement)

2. Howwellthesystemmustdowhatitdoes(qualityorperformancerequirement)

3. Aknownresourceordesignlimitation (constraint)

Moregenerally,

Arequirementisanythingthatdrivesadesign choice

8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ThePurposeofRequirements

Thepurposeofrequirementsistohelpestablishaclear,common,andcoherentunderstandingofwhatthesystemmustaccomplish.

Sowhyfocusonrequirements?ErikSimmons,nuCognitive,“21stCenturyRequirements”,11/08/11

Clear

Allstatementsareunambiguous,complete,

andconcise

Common

Allstakeholderssharethesameunderstanding

Coherent

Allstatementsareconsistentandforma

logicalwhole

9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhyFocusonRequirements?

10 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhataretheMainSoftwareChallengesYouareFacing?

Pre-webinarsurvey,“TestingImperativesintheWorldofAgileDevelopmentandContinuousDelivery”,HuwPrice&JonathonWright,28/07/15

0% 10% 20% 30% 40% 50% 60% 70%

Time/resourcesintestdatacompliance(PII)

Defectsstemmingfromambiguousrequirements

Testinginnefficienciesleadingtohighercost

Lackoftestcoveragecreatingdefects/rework

Difficultyfindingtherightdataforaparticulartest

Manualtestingleadingtoprojectdelays

11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

VAGUENESS

ExamplesofAmbiguityandIncompleteness

Poor ScopingAmbiguous Reference

Omission Acronyms

Aliasing

Sentence Structure

DanglingElse

Incomplete Glossary

Implicit Constraints

I.E. or E.g.?

LexicalAmbiguity

Polysemy

Passive Sentences

12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhatMakesaGoodRequirement?

§ complete§ consistent§ correct§ modifiable§ ranked§ traceable§ unambiguous§ understandable§ testableNASA,AutomatedRequirementsMeasurementTool,1999,http://satc.gsfc.nasa.gov/tools/arm (archive.org)

13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhatistheProblemwithRequirements?

§ Thoughaplethoraoftechniquesexist,mostarewritteninambiguousnaturallanguage

§ Therequirementsare“static”–theyoffernowaytoderivetestsdirectlyfromthem…

§ …nowaytoupdatetestswhentherequirementschange– thishastobedonemanually

BenderRBT,2009

14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

UserTheenduserknowswhattheywant

TheSDC:What’sSupposedtoHappen

BusinessAnalystTheanalystspecifieswhatthatis

DeveloperTheprogrammerwritesthecode

TesterThetesterteststheprogram

15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

TheFundamentalIssueWithThisModel

§ Ateachstagethatinformationispassedonandtransformedtoanotherform,thereisanaturaldegradationinquality

§ ThetypicalSDLChasseveralofthese“hops”:1. Requirementsareconvertedtocode2. Requirementsareconvertedtotestcases,tobeappliedtothecode3. Testcasesareconvertedintoautomatedtests4. Datahastobefoundorcreated,basedontherequirements,for

developmentandtesting

InformationHops:Enterprise-Wide“ChineseWhispers”

Theimpactonqualityiscreatedbyuncertainty.Some(inherent)uncertaintyisunavoidable.Someisavoidable,andshouldbeavoided.

16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

“RumsfeldMatrix”– AvoidablevsUnavoidableUncertainty§ InformationintheSDLCcanbebrokendowninto:

– KnownKnowns– UnknownKnowns– KnownUnknowns– UnknownUnknowns

Knowns Unknowns

Known Information AvoidableUncertaintyàObservableDefects

Unknown AvoidableUncertaintyàObservableDefects

Unavoidable Uncertainty

Inanidealworld,testerswillbeprovidedwithalltheinformationtodiscoverobservabledefects.Whateverpreviouslyunknowableinformationtheydiscoverwilladdtothe“knownknowns”

17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Unambiguous,IncompleteRequirements

§ Poorqualityrequirementsintroduceuncertaintyatthebeginning,whichisthenperpetuatedthroughouttheSDLC

§ Asystemcanbebuildaroundmisunderstanding,sothat:– Atleast56%ofdefectsstemfromambiguityinrequirements1 – some

placethisashighas59%2 oreven65%3

– 64%oftotaldefectcost3originateintherequirementsanalysisanddesignphase– someplacethisashighas80%1

– 40-50%ofprojectcosts areexpendedinrework4

– Onaverage,only69%ofdesiredfunctionalityisactuallydelivered5

Introduceavoidableuncertaintyattheverybeginning

1– BenderRBT,2009

2– ITUniveristy,Copenhagen,2001

3- HyderabadBusinessSchool,20124– Critical-Logic,20145– StandishGroup’sChaosManifesto2014

18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Unambiguous,IncompleteRequirementsAnexampleambiguityreview:

19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

AmbiguousNaturalLanguage

§ “Timeflieslikeanarrow;fruitflieslikeanapple”

§ “BuffalobuffaloBuffalobuffalobuffalobuffaloBuffalobuffalo”– Agrammaticallycorrectsentence,whichmeans“InthecityofBuffalo,

bisonwhoarebulliedbybison,arethemselvesbullyingbison”

§ Wesawherduck

Sentencestructure,homonyms,polysemy,lexicalambiguity,etc.

20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

TheDanglingElse

§ IFATHENIFBTHENCELSED– IFATHEN(IFBTHEN(C)ELSED)– IFATHEN(IFBTHEN(C))ELSED

§ IFRAINTHENIFWINDYTHENCOATELSET-Shirt– Ifitisraining,thenwearacoatifitisalsowindy.Ifitisrainingbutnot

alsowindy,wearaT-Shirt.– Ifitisraining,andifitiswindy,thenwearacoat.OtherwisewearaT-

Shirt

Incompletesystemlogicstemmingfromsyntacticalambiguity

21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ThoughaPlethoraofTechniquesExist,MostAreWritteninAmbiguousNaturalLanguage

22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhatAretheChallengesWithRequirements?

1– BenderRBT,20092– ITUniversity,Copenhagen,20013- HyderabadBusinessSchool,20124– Critical-Logic,20145– StandishGroup’sChaosManifesto2014

§ Asystemcanbebuildaroundmisunderstanding,sothat:– Atleast56%ofdefectsstemfromambiguityinrequirements1 – some

placethisashighas59%2 oreven65%3

– 64%oftotaldefectcost3originateintherequirementsanalysisanddesignphase– someplacethisashighas80%1

– 40-50%ofprojectcosts areexpendedinrework4

– Onaverage,only69%ofdesiredfunctionalityisactuallydelivered5

23 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

TheDanglingElse

§ IFATHENIFBTHENCELSED– IFATHEN(IFBTHEN(C)ELSED)– IFATHEN(IFBTHEN(C))ELSED

§ IFRAINTHENIFWINDYTHENCOATELSET-Shirt– Ifitisraining,thenwearacoatifitisalsowindy.Ifitisrainingbut

notalsowindy,wearaT-Shirt.– Ifitisraining,andifitiswindy,thenwearacoat.Otherwisewear

aT-Shirt

Incompletesystemlogicstemmingfromsyntacticalambiguity

24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

TheMissingElseAcommonmenacewhenusingBehaviour-DrivenDevelopment,GherkinandRSPEC

GIVENCurrentAccount

AndGIVENnegativebalance

WHENcustomerattemptspayment

THENgointooverdraft

25 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Requirements

Asmanyas56%ofdefectsareavoidedindevelopment

§ TestcasescanbeAuto-generatedandre-generatedfromrequirements

§ Theyareoptimizedtoprovide100%coverageinfewertests

§ Changescanbequicklyandeasilymade

§ Requirementsandtestcasesarelinkedtodatawith100%coverage,includingnegativeandfuturescenarios § Automatedtests

aregeneratedfromtestcases

§ Areupdatedifrequirementschange

§ Exhaustivelytestapplication

§ Pallet-basedUIAutomation

Requirementsaremodelledtoacomplete,unambiguous,“Active”Flowchart

ReduceUncertainty– ClearRequirementsandFewer“Hops”Code TestCases TestData Automation

26 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

APossibleSolution:Model-BasedTesting

1. Mappingrequirementstoanunambiguous,activeflowchart– Codersknowwhatneedstobecoded

2. Auto-generatetestcasesandAutomatedtests–nomore“Hops”– Executethesetestsagainstthecode,testingthatitmatches

thefunctionalityspecifiedintherequirements

3. Updatethemodelastherequirementschange,orastestinguncoversfurther,previously“unknown”information

Testasystemagainstanagreedupon,cleardefinitionofwhatthefunctionalityshouldbe

27 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

HowAboutSoftwareEngineering?

28 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhatisEngineering?

Engineeringistheapplicationofheuristicsunderuncertaintytocausethebestpossiblechangewithintheavailableresources(BillyVaughnKoen*)§ Aheuristicisanythingthatprovidesaplausibleaidordirectioninthe

solutionofaproblem§ Useofheuristicsdoesnotguaranteeasolutiontoaproblem,anddifferent

heuristicscanofferconflictingadviceforanygivensituation§ Heuristicsworkbyexploitingthestructureofanenvironmenttosimply

decisionmakingandnarrowthesolutionsearchspace

ErikSimmons,nuCognitive,11/09/16adaptedfrom“adiscussionofthemethod”,BillyVaughnKoenOxfordUniversityPress2003

29 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

HowDoesThisApplytoSoftwareEngineering(SDLC)?Simpleexampleoflackofclarityandvisionwithinthesoftwaredevelopmentlifecycle

BusinessAnalyst Programmer TesterUser

TheUserKnowswhattheywantTheAnalystspecifieswhatthatis

TheProgrammerwritesthecode

TheTesterteststheprogram

Clarity&Vision

30 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

HowAboutWithinLean&Agile?

DeanLeffingwell,ScaledAgileFrameworkFoundations(v4.0.6),“EmbracingLean-Agilevalues”,2016

HouseofLean AgileManifesto

LEADERSHIP

Res

pect

for

peop

le a

nd c

ultu

re

Flow

Inno

vatio

n

Rel

entle

ssim

prov

emen

t

VALUE

Valueinthesustainablyshortestleadtime

Thatis,whilethereisvalueintheitemsontheright,wevaluetheitemsontheleftmore.

Weareuncoveringbetterwaysofdevelopingsoftwarebydoingitandhelpingothersdoit.Throughthisworkwehavecometovalue:

Individualsandinteractionsoverprocessesandtools

Workingsoftwareovercomprehensivedocumentation

Customercollaborationovercontractnegotiation

Respondingtochangeoverfollowingaplan

31 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

HowAboutRequirementsEngineering?

32 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Definition:RequirementEngineeringISO/IEC/IEEE29148:2011

Wikipedia

Referstotheprocessofdefining,documentingandmaintainingrequirementstothesub-fieldsof

systemsengineeringandsoftwareengineeringconcernedwiththisprocess.

Interdisciplinaryfunctionthatmediatesbetweenthedomainsoftheacquirerandsuppliertoestablishand

maintaintherequirementstobemetbythesystem,softwareorserviceofinterest.Requirementsengineering

isconcernedwithdiscovering,eliciting,developing,analysing,determiningverificationmethods,validating,

communicating,documenting,andmanagingrequirements.

33 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhatisRequirementsEngineering?

Requirementsengineeringistheuseofheuristicsfordiscovering,documenting,andmaintaining asetofrequirementsforasystemorserviceAtthehighestlevel,requirementsengineeringseeksto:§ Definethenecessaryandsufficientsystemscopeandfeaturesto

enablesystemdevelopmentatanacceptablelevelofrisk§ Enablerequirements-drivenarchitecture,design,construction,

andverificationactivities§ Provideinformationaboutsystemdevelopmentprogressandstatus§ Provideinformationtoorganizationallearningandcontinuous

improvementeffortsErikSimmons,nuCognitive,11/09/16adaptedfrom“adiscussionofthemethod”,BillyVaughnKoen,OxfordUniversityPress2003

34 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

HowtoManageRequirementsEngineering?

ToGenerateTestCases

DesignandprovisionTestDataVirtualisation

ToManageChangeinTestCases

ToGenerateAutomation

Tests

ToEstimateComplexity

PopulateStoryBoards&Backlogs

ToBuildBetterRequirements

ToImproveExisting

TestCases DesignandprovisionServiceVirtualization

ImpactandDifferences

built by

CAAgileRequirementsDesigner

NativeSupport

35 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

IntroducingtheRequirement-drivenApproach

36 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

DesignOpsistheNewDeliveryParadigm:FromIdeationtoDesign,DevelopmentandTesting

37 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ModelRequirementsasan“Active”Flowchart

§ AformalmodelthatisaccessibletothebusinesswhoalreadyuseVISIO,BPM,etc.

§ Whichisalsoamathematicallyprecisemodelofasystem,sothatiteliminatesambiguityandincompleteness

§ Itcanbeusedbytestersanddevelopers–itbringstheend-user,businessandITintoclosealignment

38 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

TestingWiththe“Active”Flowchart

§ Testerscanoverlaytheflowchartwithallthefunctionallogicanddatainvolvedinasystem

§ Testscanthereforebeautomaticallyderivedfromit

39 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

GeneratingTestCases

§ Exhaustivelytestamodel– extractallpossibleroutesfromstart->end

§ Eachroute/pathbecomesatestcase

§ Numberofroutesgrowsexponentiallywitheveryaddeddecision32nodes+62edges=1,073,741,824possibleroutes

2145Paths

40 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Optimization/Coverage

§ Coverage,inmostcases,isrelatedtohowmuchfunctionalityisbeingcoveredinatestcase.

§ Traversethemodelbysatisfyingcoverageconstraints:19PathsEdgePairs

9PathsInOutEdges

5PathsEdges

3PathsNodes

41 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

GenerateTestData

NotReadyforTesting!

CATestDataManager+Requireddatacharacteristics

Provisionfitforpurpose dataanytimeandeverytimeProvisiondatawithorwithoutaccesstoproductionsystems

ReadyforTesting!

§ Automaticallyprofiledata,modelit,andaccuratelymeasureitscoverage§ Generaterichsyntheticdatawhichprovides100%coverage§ Covereveryoutlier,unexpectedresult,boundaryconditionandnegativepath

42 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ProvideFullTraceabilitywithRequirements

§ Knowwhatneedstobere-testedandwhentheintegrityofasystemisatrisk…“IfIchangethis,whatwillIbreak?”

§ Theimpactofachangemadetoanindividualcomponentisidentifiedsystemwide

§ Theimpactontestcasesanduserstoriesupanddownasystemcanalsobeidentifiedautomatically

43 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ButAllofThisStillDependsontheRequirementsBeingRight!§ Yes,youcanreaphugerewardsfrommaintainingonevery

highqualityartefact,ratherthanthousands.

§ No,nosilverbullet,modelscanbewrong,peoplecanstillmakemistakes

§ TheideabehindMBTandARDistomakethosepotentialmistakesmoreobviousandeasiertofixoncediscovered

§ Andofcourseleveragethemodel,whilstacknowledgingtheresidualrisk.

44 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Demo

45 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

FunExample:PokémonGo

PokémonGo,HuwPrice,22/07/16,(www.grid-tools-downloads.com/huw/POKEMONGO.zip)

46 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Summary:Heuristics,RiskandRequirementsEngineering§ Valueiskeytodeliveringsoftwarewhichmatterstousers:

– asolutionmustbefrequentlyanditerativelymeasuredforvalue

§ PoorRequirementsdegradequalitybutalsointerruptthevaluestream:– Testerscannottestrigorouslyorquicklyagainstcustomerneeds

§ Requirementscanalsothereforebekeytoimprovingthedeliveryrateofvaluablesoftware

§ Enablingrequirements-drivendesign,constructionandverification:– Modelrequirementsas“active”flowcharts– Testfromtheflowchartwithauto-generationoftests/scripts– Generatetestdatatomatchthetestcases– Updatetestswhentherequirementschange

47 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Questions?

48 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

RecommendedSessions

SESSION# TITLE DATE/TIME

DO5T05TTechTalk:GoingFullCircle- LinkingCodetoTeststoRequirementsandBackAroundAgain

11/16/2016at12:45pm

DO5X27S What'sNewinCAAgileRequirementsDesigner? 11/17/2016at12:45pm

DO5X40S CaseStudy:WhyRabobankWasInspired 11/17/2016at3:45pm

49 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

MustSeeDemos

UseModelBasedTesting

CAARDDevOpsTheatre5

DevOps5Theatre

AchieveMaxTestCoverage

CAARDDevOpsTheatre5

ImproveDataCompliance

CATestDataManagerDevOpsTheatre5

DeliverTestDataFaster

CATestDataManagerDevOpsTheatre5

50 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Stayconnectedatcommunities.ca.com

Thankyou.

@CAWORLD#CAWORLD ©2016CA.AllRIGHTSRESERVED.51 @CAWORLD#CAWORLD

DevOps– ContinuousDelivery

FormoreinformationonDevOps– ContinuousDelivery,pleasevisit:http://cainc.to/PiTFpu