CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design...

28
Cornell University Compu1ng and Informa1on Science CS 5150 So(ware Engineering 6. Requirements Analysis William Y. Arms

Transcript of CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design...

Page 1: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

CornellUniversity Compu1ngandInforma1onScience

CS5150So(wareEngineering6.RequirementsAnalysis

WilliamY.Arms

Page 2: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

Requirements

RequirementsdefinethefuncConofthesystemfromtheclient'sviewpoint. •Therequirementsestablishthesystem'sfuncConality,constraints,andgoalsbyconsultaConwiththeclient,customers,andusers.

•Therequirementsmaybedevelopedinaself-containedstudy,ormayemergeincrementally.

•TherequirementsformthebasisforacceptancetesCng. Thedevelopmentteamandtheclientneedtoworktogethercloselyduringtherequirementsphaseofaso(wareproject. •Therequirementsmustbedevelopedinamannerthatisunderstandablebyboththeclientandthedevelopmentstaff.

Page 3: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

WhyareRequirementsImportant?

Causesoffailedso>wareprojects Incompleterequirements 13.1% Lackofuserinvolvement12.4%

Lackofresources 10.6%UnrealisCcexpectaCons 9.9%

LackofexecuCvesupport 9.3% Changingrequirements&specificaCons 8.8% Lackofplanning 8.1% Systemnolongerneeded 7.5% Failurestounderstandtherequirementsledthedeveloperstobuildthewrongsystem.

Source:StandishGroup

Page 4: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementsinIteraCveRefinement

TherequirementsarerevisedforeachiteraCon.

Requirements

Design

ImplementaCon

Review

Release

Page 5: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementsintheModifiedWaterfallModel

TherequirementsneedconCnualupdaCngastheprojectconCnues.

Requirements

Systemdesign

ProgramtesCng

OperaCon&maintenance

Programdesign

ImplementaCon(coding)

Acceptance&release

Feasibilitystudy

Page 6: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementswithAgileDevelopment

Eachsprinthasitsownsetofrequirements.

Sprint1 Sprint2 Sprint3

Testedcode

Testedcode

Testedcode

Page 7: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementGoals

•Understandtherequirementsinappropriatedetail. •Definetherequirementsinamannerthatiscleartotheclient.ThismaybeawridenspecificaCon,prototypesystem,orotherformofcommunicaCon.

•Definetherequirementsinamannerthatiscleartothepeoplewhowilldesign,implement,andmaintainthesystem.

•Ensurethattheclientanddevelopersunderstandtherequirementsandtheirimplica1ons.

ManyCS5150projectsusethefirstpresentaConandtheaccompanyingreporttoconfirmtherequirementswiththeclient. "Ourunderstandingofyourrequirementsisthat...”

Page 8: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

StepsintheRequirementsPhase

Therequirementspartofaprojectcanbedividedintoseveralstages: •Analysistoestablishthesystem'sservices,constraints,andgoalsbyconsultaConwithclient,customers,andusers.

•ModelingtoorganizetherequirementsinasystemaCcandcomprehensiblemanner.

•Define,record,andcommunicatetherequirements. WithiteraCveandagilemethods,thesestageswillberepeatedseveralCmes.

Page 9: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

TheRequirementsProcess

Feasibility study

Analyze

Model

DefineFeasibility report

Recordandcommunicate

Workwiththeclienttounderstandrequirements

OrganizerequirementsinasystemaCcandcomprehensiblemanner

ReportoralternaCvedescripCon(opConal)

Page 10: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementsAnalysis:InterviewswithClients

Clientinterviewsaretheheartoftherequirementsanalysis. Clientsmayhaveonlyavagueconceptofrequirements. •AllowplentyofCme. •Preparebeforeyoumeetwiththeclient. •Keepfullnotes. •Ifyoudonotunderstand,delvefurther,againandagain. •Repeatwhatyouhear. ForyourCS5150projectsyouwillneedtoscheduleseveralmeeCngswithyourclienttoanalyzetherequirements. SmallgroupmeeCngsareo(enmosteffecCve.

Page 11: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementsAnalysis:UnderstandtheRequirements

Understandtherequirementsindepth •Domainunderstanding Example:Manufacturinglightbulbs •Understandingoftherealrequirementsofallstakeholders Stakeholdersmaynothaveclearideasaboutwhattheyrequire,or

theymaynotexpressrequirementsclearly. Theyareo(entooclosetotheoldwayofdoingthings. •Understandingtheterminology Clientso(enusespecializedterminology.Ifyoudonot

understandit,askforanexplanaCon. KeepaskingquesCons,“Whydoyoudothingsthisway?”“Isthisessen8al?”“Whatarethealterna8ves?”

Page 12: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementsAnalysis:NewandOldSystems

AnewsystemiswhenthereisnoexisCngsystem.Thisisrare. AreplacementsystemiswhenasystemisbuilttoreplaceanexisCngsystem. AlegacysystemisanexisCngsystemthatisnotbeingreplaced,butmustinterfacetothenewsystem. Clientso(enconfusethecurrentsystemwiththeunderlyingrequirement. Inrequirementsanalysisitisimportanttodis1nguish: •featuresofthecurrentsystemthatareneededinthenewsystem •featuresofthecurrentsystemthatarenotneededinthenewsystem •proposednewfeatures

Page 13: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementsAnalysis:UnspokenRequirements

Discoveringtheunspokenrequirementsiso(enthemostdifficultpartofdevelopingtherequirements. Examples: •Resistancetochange •DepartmentalfricCon(e.g.,transferofstaff) •Managementstrengthsandweaknesses

Page 14: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementsAnalysis:Stakeholders

Iden1fythestakeholders: Whoisaffectedbythissystem? Client Seniormanagement ProducConstaff CompuCngstaff Customers Users(manycategories) etc.,etc.,etc., Example: Webshoppingsite(shoppers,administraCon,finance,warehouse) CS5150projectsthatbuildwebapplicaConso(enfindthattheadministraCvesystemthatisnotseenbytheusersisbiggerthanthepartofthesitethatisvisibletotheusers.

Page 15: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementsAnalysis:ViewpointAnalysis

ViewpointAnalysis Analyzetherequirementsasseenbyeachgroupofstakeholders. Example:UniversityAdmissionsSystem •Applicants •UniversityadministraCon Admissionsoffice Financialaidoffice Specialoffices(e.g.,athleCcs,development) •Academicdepartments •Compu8ngstaff •Opera8onsandmaintenance

Page 16: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementsAnalysis:SpecialStudies

Understandingtherequirementsmayneedstudies: Marketresearch focusgroups,surveys,compeCCveanalysis,etc. Example:WindowsXPT-shirtthathighlightedApple’sstrengths Technicalevalua1on experiments,prototypes,etc. Example:WindowsXPbootfaster

Page 17: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

DefiningandCommunicaCngRequirements

Objec1ves Recordagreementbetweenclientsanddevelopers • ProvideabasisforacceptancetesCng • Providevisibility • BeafoundaConforsystemandprogramdesign • Communicatewithotherteamswhomayworkonorrelyonthissystem

• Informfuturemaintainers

Page 18: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

DefiningandCommunicaCngRequirements:RealismandVerifiability

Requirementsmustberealis1c,i.e.,itmustbepossibletomeetthem.Wrong:Thesystemmustbecapableofx(ifnoknowncomputersystemcandoxatareasonablecost).Requirementsmustbeverifiable,i.e.,sincetherequirementsarethebasisforacceptancetesCng,itmustbepossibletotestwhetherarequirementhasbeenmet.Wrong:Thesystemmustbeeasytouse.Right:AJeroneday'straininganoperatorshouldbeabletoinput50ordersperhour.

Page 19: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

DefiningandCommunicaCngRequirements:OpCon1–HeavyweightProcesses

Heavyweightso>wareprocessesexpectdetailedspecifica1on • WridendocumentaConthatspecifieseachrequirementindetail. • Carefullycheckedbyclientanddevelopers. • Maybeacontractualdocument. DifficulCes • Timeconsuminganddifficulttocreate. • Timeconsuminganddifficulttomaintain. • CheckingadetailedspecificaConisdifficultandtedious. • Detailsmayobscuretheoverviewoftherequirements.• ClientsrarelyunderstandtheimplicaCons. ThedifficultyofcreaCngandmaintainingadetailedrequirementsspecificaConisoneofthereasonsthatmanyorganizaConsareadractedtolighterweightdevelopmentprocesses.

Page 20: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

DefiningandCommunicaCngRequirements:OpCon2–LightweightProcesses

Lightweightprocessesuseaoutlinespecifica1on+othertools • DocumentaCondescribingkeyrequirementsinappropriatedetail. • Reviewedbyclientanddevelopers. Detailsprovidedbysupplementarytools,e.g., • Userinterfacemock-upordemonstraCon. • Models,e.g.,databaseschema,statemachine,etc. ClientsunderstandprototypesandmodelsbederthanspecificaCon • IteraCveorincremental(agile)developmentprocessesallowstheclienttoappreciatewhatthefinalsystemwilldo.

Page 21: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

LightweightProcesses(conCnued)

Withlightweightprocesses,experienceandjudgmentareneededtodisCnguishbetweendetailsthatcanbele(forlaterinthedevelopmentprocessandkeyrequirementsthatmustbeagreedwiththeclientearlyintheprocess. Exampleswheredetailedspecifica1onsareusuallyneeded • Businessrules(e.g.,referencetoanaccounCngstandard) • Legalrestraint(e.g.,lawsonretenConofdata,privacy) • Dataflow(e.g.,sourcesofdata,datavalidaCon) Acommonfaultistomisscrucialdetails.Thisresultsinmisunderstandingsbetweentheclientandthedevelopers.YetthewholeintentoflightweightprocessesistohaveminimalintermediatedocumentaCon.

Page 22: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementsinGovernmentSystems

22

GovernmentsystemsintheUSAandabroadhaveareputaConforpoorfuncConalitycombinedwithdelaysandcostover-runs.MypersonalopinionisthatthemethodofcontracCngisamajorcontributortotheseproblems.• Responsibleuseoftaxpayers’moneyleadstocontractsinwhicheachsub-processhasadefineddeliverableatanagreedprice.

• InparCcularmostcontractsdemandadetailedrequirementspecificaConbeforethecontractfordesignandimplementaConareplaced.

• Thisleadstoawaterfallmodelofdevelopment,o(enwithpenalCesformodificaConsoftherequirements.

Butinmanygovernmentsystemstherequirementsarenotwellunderstood.• TheyshoulduseadevelopmentprocessinwhichtherequirementsareflexibleandthedesignevolvesiteraCvely.

• Contractsforsuchdevelopmentprocessesaredifficulttowrite,buttheyleadtobederso(ware.

Page 23: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

FuncConalRequirements

Func1onalrequirementsdescribethefuncConsthatthesystemmustperform.TheyareidenCfiedbyanalyzingtheusemadeofthesystemandincludetopicssuchas: • FuncConality •Data •Userinterfaces

Page 24: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

Non-FuncConalRequirements

Requirementsthatarenotdirectlyrelatedtothefunc1onsthatthesystemmustperform Productrequirements performance,reliability,portability,etc... OrganizaConalrequirements delivery,training,standards,etc... Externalrequirements legal,interoperability,etc... MarkeCngandpublicrelaCons Example: IntheNSDL,theclient(theNaConalScienceFoundaCon)wantedalivesystemthatcouldbedemonstratedtoseniormanagerssixmonthsa(erthegrantwasawarded.

Page 25: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

ExampleofNon-FuncConalRequirements

Example:LibraryofCongressRepository Usetechnologythattheclient'sstaffarefamiliarwith: • Hardwareandso(waresystems(IBM/Unix) • Databasesystems(Oracle) • Programminglanguages(CandC++) Recognizethattheclientisafederallibrary • RegulaConscoveringgovernmentsystems,e.g.,accessibilityto

peoplewithdisabiliCes • Importanceofdevelopingasystemthatwouldberespectedby

othermajorlibraries

Page 26: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

Requirements:NegoCaConwiththeClient

Somerequestsfromtheclientmayconflictwithothers:Recognizeandresolveconflicts (e.g.,funcConalityv.costv.Cmeliness)Example: WindowsXPbootfaster:shorterCme-outv.recognizeallequipmentonbus

Page 27: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

Requirements:NegoCaConwiththeClient

SomeCmestheclientwillrequestfuncConalitythatisveryexpensiveorimpossible.Whatdoyoudo? •Talkthroughtherequirementwiththeclient.Whyisitwanted?IsthereanalternaCvethatisequivalent?

•Explainthereasoningbehindyourconcern.Explainthetechnical,organizaConal,andcostimplicaCons.

•BeopentosuggesCons.Isthereagapinyourunderstanding?Perhapsasecondopinionmightsuggestotherapproaches.

BeforetherequirementsphaseiscompletedtheclientanddevelopmentteammustresolvethesequesCons. Example NaConalScienceFoundaCongrantsystem,clientaskedforeveryformatthathadeverbeenusedinproposals(e.g.,scienCficsamples).A(ernegoCaCon,agreedthatthefirstphasewouldsupportonlyPDF.

Page 28: CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design Dilemma about technical decisions • Requirements analysis should make minimal

RequirementsAnalysisv.SystemDesign

Dilemmaabouttechnicaldecisions • RequirementsanalysisshouldmakeminimalassumpConsaboutthesystemdesign.

• ButtherequirementsdefiniConmustbeconsistentwithcompuCngtechnologyandtheresourcesavailable.

InpracCce,analysisanddesignareinterwoven.However: 1.Donotallowassump8onsaboutthedesigntoinfluencethe

requirementsanalysis. 2.Donottoallowtherequirementsanalysistoprejudgethesystemdesign.