CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design...
Transcript of CS 5150 So(ware Engineering 6. Requirements Analysis€¦ · Requirements Analysis v. System Design...
CornellUniversity Compu1ngandInforma1onScience
CS5150So(wareEngineering6.RequirementsAnalysis
WilliamY.Arms
Requirements
RequirementsdefinethefuncConofthesystemfromtheclient'sviewpoint. •Therequirementsestablishthesystem'sfuncConality,constraints,andgoalsbyconsultaConwiththeclient,customers,andusers.
•Therequirementsmaybedevelopedinaself-containedstudy,ormayemergeincrementally.
•TherequirementsformthebasisforacceptancetesCng. Thedevelopmentteamandtheclientneedtoworktogethercloselyduringtherequirementsphaseofaso(wareproject. •Therequirementsmustbedevelopedinamannerthatisunderstandablebyboththeclientandthedevelopmentstaff.
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
RequirementsinIteraCveRefinement
TherequirementsarerevisedforeachiteraCon.
Requirements
Design
ImplementaCon
Review
Release
RequirementsintheModifiedWaterfallModel
TherequirementsneedconCnualupdaCngastheprojectconCnues.
Requirements
Systemdesign
ProgramtesCng
OperaCon&maintenance
Programdesign
ImplementaCon(coding)
Acceptance&release
Feasibilitystudy
RequirementswithAgileDevelopment
Eachsprinthasitsownsetofrequirements.
Sprint1 Sprint2 Sprint3
Testedcode
Testedcode
Testedcode
RequirementGoals
•Understandtherequirementsinappropriatedetail. •Definetherequirementsinamannerthatiscleartotheclient.ThismaybeawridenspecificaCon,prototypesystem,orotherformofcommunicaCon.
•Definetherequirementsinamannerthatiscleartothepeoplewhowilldesign,implement,andmaintainthesystem.
•Ensurethattheclientanddevelopersunderstandtherequirementsandtheirimplica1ons.
ManyCS5150projectsusethefirstpresentaConandtheaccompanyingreporttoconfirmtherequirementswiththeclient. "Ourunderstandingofyourrequirementsisthat...”
StepsintheRequirementsPhase
Therequirementspartofaprojectcanbedividedintoseveralstages: •Analysistoestablishthesystem'sservices,constraints,andgoalsbyconsultaConwithclient,customers,andusers.
•ModelingtoorganizetherequirementsinasystemaCcandcomprehensiblemanner.
•Define,record,andcommunicatetherequirements. WithiteraCveandagilemethods,thesestageswillberepeatedseveralCmes.
TheRequirementsProcess
Feasibility study
Analyze
Model
DefineFeasibility report
Recordandcommunicate
Workwiththeclienttounderstandrequirements
OrganizerequirementsinasystemaCcandcomprehensiblemanner
ReportoralternaCvedescripCon(opConal)
RequirementsAnalysis:InterviewswithClients
Clientinterviewsaretheheartoftherequirementsanalysis. Clientsmayhaveonlyavagueconceptofrequirements. •AllowplentyofCme. •Preparebeforeyoumeetwiththeclient. •Keepfullnotes. •Ifyoudonotunderstand,delvefurther,againandagain. •Repeatwhatyouhear. ForyourCS5150projectsyouwillneedtoscheduleseveralmeeCngswithyourclienttoanalyzetherequirements. SmallgroupmeeCngsareo(enmosteffecCve.
RequirementsAnalysis:UnderstandtheRequirements
Understandtherequirementsindepth •Domainunderstanding Example:Manufacturinglightbulbs •Understandingoftherealrequirementsofallstakeholders Stakeholdersmaynothaveclearideasaboutwhattheyrequire,or
theymaynotexpressrequirementsclearly. Theyareo(entooclosetotheoldwayofdoingthings. •Understandingtheterminology Clientso(enusespecializedterminology.Ifyoudonot
understandit,askforanexplanaCon. KeepaskingquesCons,“Whydoyoudothingsthisway?”“Isthisessen8al?”“Whatarethealterna8ves?”
RequirementsAnalysis:NewandOldSystems
AnewsystemiswhenthereisnoexisCngsystem.Thisisrare. AreplacementsystemiswhenasystemisbuilttoreplaceanexisCngsystem. AlegacysystemisanexisCngsystemthatisnotbeingreplaced,butmustinterfacetothenewsystem. Clientso(enconfusethecurrentsystemwiththeunderlyingrequirement. Inrequirementsanalysisitisimportanttodis1nguish: •featuresofthecurrentsystemthatareneededinthenewsystem •featuresofthecurrentsystemthatarenotneededinthenewsystem •proposednewfeatures
RequirementsAnalysis:UnspokenRequirements
Discoveringtheunspokenrequirementsiso(enthemostdifficultpartofdevelopingtherequirements. Examples: •Resistancetochange •DepartmentalfricCon(e.g.,transferofstaff) •Managementstrengthsandweaknesses
RequirementsAnalysis:Stakeholders
Iden1fythestakeholders: Whoisaffectedbythissystem? Client Seniormanagement ProducConstaff CompuCngstaff Customers Users(manycategories) etc.,etc.,etc., Example: Webshoppingsite(shoppers,administraCon,finance,warehouse) CS5150projectsthatbuildwebapplicaConso(enfindthattheadministraCvesystemthatisnotseenbytheusersisbiggerthanthepartofthesitethatisvisibletotheusers.
RequirementsAnalysis:ViewpointAnalysis
ViewpointAnalysis Analyzetherequirementsasseenbyeachgroupofstakeholders. Example:UniversityAdmissionsSystem •Applicants •UniversityadministraCon Admissionsoffice Financialaidoffice Specialoffices(e.g.,athleCcs,development) •Academicdepartments •Compu8ngstaff •Opera8onsandmaintenance
RequirementsAnalysis:SpecialStudies
Understandingtherequirementsmayneedstudies: Marketresearch focusgroups,surveys,compeCCveanalysis,etc. Example:WindowsXPT-shirtthathighlightedApple’sstrengths Technicalevalua1on experiments,prototypes,etc. Example:WindowsXPbootfaster
DefiningandCommunicaCngRequirements
Objec1ves Recordagreementbetweenclientsanddevelopers • ProvideabasisforacceptancetesCng • Providevisibility • BeafoundaConforsystemandprogramdesign • Communicatewithotherteamswhomayworkonorrelyonthissystem
• Informfuturemaintainers
DefiningandCommunicaCngRequirements:RealismandVerifiability
Requirementsmustberealis1c,i.e.,itmustbepossibletomeetthem.Wrong:Thesystemmustbecapableofx(ifnoknowncomputersystemcandoxatareasonablecost).Requirementsmustbeverifiable,i.e.,sincetherequirementsarethebasisforacceptancetesCng,itmustbepossibletotestwhetherarequirementhasbeenmet.Wrong:Thesystemmustbeeasytouse.Right:AJeroneday'straininganoperatorshouldbeabletoinput50ordersperhour.
DefiningandCommunicaCngRequirements:OpCon1–HeavyweightProcesses
Heavyweightso>wareprocessesexpectdetailedspecifica1on • WridendocumentaConthatspecifieseachrequirementindetail. • Carefullycheckedbyclientanddevelopers. • Maybeacontractualdocument. DifficulCes • Timeconsuminganddifficulttocreate. • Timeconsuminganddifficulttomaintain. • CheckingadetailedspecificaConisdifficultandtedious. • Detailsmayobscuretheoverviewoftherequirements.• ClientsrarelyunderstandtheimplicaCons. ThedifficultyofcreaCngandmaintainingadetailedrequirementsspecificaConisoneofthereasonsthatmanyorganizaConsareadractedtolighterweightdevelopmentprocesses.
DefiningandCommunicaCngRequirements:OpCon2–LightweightProcesses
Lightweightprocessesuseaoutlinespecifica1on+othertools • DocumentaCondescribingkeyrequirementsinappropriatedetail. • Reviewedbyclientanddevelopers. Detailsprovidedbysupplementarytools,e.g., • Userinterfacemock-upordemonstraCon. • Models,e.g.,databaseschema,statemachine,etc. ClientsunderstandprototypesandmodelsbederthanspecificaCon • IteraCveorincremental(agile)developmentprocessesallowstheclienttoappreciatewhatthefinalsystemwilldo.
LightweightProcesses(conCnued)
Withlightweightprocesses,experienceandjudgmentareneededtodisCnguishbetweendetailsthatcanbele(forlaterinthedevelopmentprocessandkeyrequirementsthatmustbeagreedwiththeclientearlyintheprocess. Exampleswheredetailedspecifica1onsareusuallyneeded • Businessrules(e.g.,referencetoanaccounCngstandard) • Legalrestraint(e.g.,lawsonretenConofdata,privacy) • Dataflow(e.g.,sourcesofdata,datavalidaCon) Acommonfaultistomisscrucialdetails.Thisresultsinmisunderstandingsbetweentheclientandthedevelopers.YetthewholeintentoflightweightprocessesistohaveminimalintermediatedocumentaCon.
RequirementsinGovernmentSystems
22
GovernmentsystemsintheUSAandabroadhaveareputaConforpoorfuncConalitycombinedwithdelaysandcostover-runs.MypersonalopinionisthatthemethodofcontracCngisamajorcontributortotheseproblems.• Responsibleuseoftaxpayers’moneyleadstocontractsinwhicheachsub-processhasadefineddeliverableatanagreedprice.
• InparCcularmostcontractsdemandadetailedrequirementspecificaConbeforethecontractfordesignandimplementaConareplaced.
• Thisleadstoawaterfallmodelofdevelopment,o(enwithpenalCesformodificaConsoftherequirements.
Butinmanygovernmentsystemstherequirementsarenotwellunderstood.• TheyshoulduseadevelopmentprocessinwhichtherequirementsareflexibleandthedesignevolvesiteraCvely.
• Contractsforsuchdevelopmentprocessesaredifficulttowrite,buttheyleadtobederso(ware.
FuncConalRequirements
Func1onalrequirementsdescribethefuncConsthatthesystemmustperform.TheyareidenCfiedbyanalyzingtheusemadeofthesystemandincludetopicssuchas: • FuncConality •Data •Userinterfaces
Non-FuncConalRequirements
Requirementsthatarenotdirectlyrelatedtothefunc1onsthatthesystemmustperform Productrequirements performance,reliability,portability,etc... OrganizaConalrequirements delivery,training,standards,etc... Externalrequirements legal,interoperability,etc... MarkeCngandpublicrelaCons Example: IntheNSDL,theclient(theNaConalScienceFoundaCon)wantedalivesystemthatcouldbedemonstratedtoseniormanagerssixmonthsa(erthegrantwasawarded.
ExampleofNon-FuncConalRequirements
Example:LibraryofCongressRepository Usetechnologythattheclient'sstaffarefamiliarwith: • Hardwareandso(waresystems(IBM/Unix) • Databasesystems(Oracle) • Programminglanguages(CandC++) Recognizethattheclientisafederallibrary • RegulaConscoveringgovernmentsystems,e.g.,accessibilityto
peoplewithdisabiliCes • Importanceofdevelopingasystemthatwouldberespectedby
othermajorlibraries
Requirements:NegoCaConwiththeClient
Somerequestsfromtheclientmayconflictwithothers:Recognizeandresolveconflicts (e.g.,funcConalityv.costv.Cmeliness)Example: WindowsXPbootfaster:shorterCme-outv.recognizeallequipmentonbus
Requirements:NegoCaConwiththeClient
SomeCmestheclientwillrequestfuncConalitythatisveryexpensiveorimpossible.Whatdoyoudo? •Talkthroughtherequirementwiththeclient.Whyisitwanted?IsthereanalternaCvethatisequivalent?
•Explainthereasoningbehindyourconcern.Explainthetechnical,organizaConal,andcostimplicaCons.
•BeopentosuggesCons.Isthereagapinyourunderstanding?Perhapsasecondopinionmightsuggestotherapproaches.
BeforetherequirementsphaseiscompletedtheclientanddevelopmentteammustresolvethesequesCons. Example NaConalScienceFoundaCongrantsystem,clientaskedforeveryformatthathadeverbeenusedinproposals(e.g.,scienCficsamples).A(ernegoCaCon,agreedthatthefirstphasewouldsupportonlyPDF.
RequirementsAnalysisv.SystemDesign
Dilemmaabouttechnicaldecisions • RequirementsanalysisshouldmakeminimalassumpConsaboutthesystemdesign.
• ButtherequirementsdefiniConmustbeconsistentwithcompuCngtechnologyandtheresourcesavailable.
InpracCce,analysisanddesignareinterwoven.However: 1.Donotallowassump8onsaboutthedesigntoinfluencethe
requirementsanalysis. 2.Donottoallowtherequirementsanalysistoprejudgethesystemdesign.