coming up: what is a requirement? 1 software engineering: a practitioner’s approach, 7/e chapter 5...

38
Coming up: What is a requirement? 1 Software Engineering: A Practitioner’s Approach, Software Engineering: A Practitioner’s Approach, 7/e 7/e Chapter 5 Chapter 5 Requirements Engineering Requirements Engineering Modified to include Modified to include some Agile Concepts some Agile Concepts copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc. NOTE: Some slides referenced from: Ian Sommerville Slides for

Upload: branden-warner

Post on 19-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Coming up: What is a requirement? 1

Software Engineering: A Practitioner’s Software Engineering: A Practitioner’s Approach, 7/eApproach, 7/e

Chapter 5Chapter 5Requirements EngineeringRequirements Engineering

Modified to include Modified to include some Agile Conceptssome Agile Concepts

copyright © 1996, 2001, 2005

R.S. Pressman & Associates, Inc.

NOTE: Some slides referenced from: Ian Sommerville Slides for Software Engineering.

Coming up: Requirements come in many forms 2

What is a requirement?What is a requirement? Requirements are used to describe all aspects of a Requirements are used to describe all aspects of a

systemsystem They may range from a high-level abstract They may range from a high-level abstract

statement of a service or of a system constraint to a statement of a service or of a system constraint to a detailed mathematical functional specificationdetailed mathematical functional specification

They serve many rolesThey serve many roles May be the basis for a bid for a contract - therefore must May be the basis for a bid for a contract - therefore must

be open to interpretationbe open to interpretation May be the basis for the contract itself - therefore must be May be the basis for the contract itself - therefore must be

defined in detaildefined in detail Are always used to communicate what you intend to buildAre always used to communicate what you intend to build

Requirements come in many Requirements come in many formsforms

Requirements Statements – ex: “The system shall Requirements Statements – ex: “The system shall ….”….”

UML Use-case diagramsUML Use-case diagrams eXtreme Programming “User Stories”eXtreme Programming “User Stories” Scrum Product BacklogScrum Product Backlog Any other documents that communicate what you Any other documents that communicate what you

intend to buildintend to build Prototypes can be used as requirementsPrototypes can be used as requirements Existing systems can serve as requirements “Build this Existing systems can serve as requirements “Build this

system, but use Java instead of Fortran”system, but use Java instead of Fortran” UML Sequence diagrams, State charts, activity diagrams…UML Sequence diagrams, State charts, activity diagrams…

3Coming up: All Requirements

Coming up: Typical Requirements Statements 4

All RequirementsAll Requirements

Should specify external behavior of the system Should specify external behavior of the system

Includes functional and non-functional requirementsIncludes functional and non-functional requirements FunctionalFunctional requirements are statements of the requirements are statements of the

services that the system must provideservices that the system must provide What must the system do? (Start all with the phrase What must the system do? (Start all with the phrase

“The system shall…”)“The system shall…”)

Non-functionalNon-functional requirements are constraints on requirements are constraints on the services and functions offered by the systemthe services and functions offered by the system How must it do it? or a constraint on the systemHow must it do it? or a constraint on the system

Coming up: Why do we care? 5

Typical Requirements Typical Requirements StatementsStatements

FunctionalFunctional: The system shall display the heart : The system shall display the heart rate, blood pressure and temperature of a rate, blood pressure and temperature of a patient connected to the patient monitor.patient connected to the patient monitor.

Non-Functional:Non-Functional: "Display of the patient's vital "Display of the patient's vital signs must respond to a change in the patient's signs must respond to a change in the patient's status within 2 seconds.”status within 2 seconds.” ‘‘ilities’ - ilities’ - Performance, Scalability, Capacity, Availability Performance, Scalability, Capacity, Availability

Reliability, Recoverability, Maintainability, Serviceability, Reliability, Recoverability, Maintainability, Serviceability, Security,Regulatory,ManageabilitySecurity,Regulatory,Manageability

What are some functional requirements on an iPod? Non-functional?

Coming up: Prescriptive versus Agile approach 6

Why do we care?Why do we care? Most large software systems address wicked Most large software systems address wicked

problemsproblems Problems which are so complex that they can Problems which are so complex that they can

never be fully understood and where never be fully understood and where understanding develops during the system understanding develops during the system developmentdevelopment

Therefore, requirements are normally both Therefore, requirements are normally both incomplete and inconsistentincomplete and inconsistent

Requirements help by giving you the best Requirements help by giving you the best understanding you can have at the beginningunderstanding you can have at the beginningI’ll destroy you and your

little software projectto!

problem

Prescriptive versus Agile Prescriptive versus Agile approachapproach

Prescriptive – approach is to Prescriptive – approach is to minimize/prevent change minimize/prevent change by understanding system thoroughly at the beginningby understanding system thoroughly at the beginning Typically heard: “A change during implementation costs 10 Typically heard: “A change during implementation costs 10

times more than a change during requirements phase”times more than a change during requirements phase”

Agile – approach is to Agile – approach is to manage change manage change by being flexible by being flexible (i.e. Agile)(i.e. Agile) Typically heard: Requirements planned for 6 months from now Typically heard: Requirements planned for 6 months from now

are most likely completely inaccurate. Don’t waste resources are most likely completely inaccurate. Don’t waste resources planning far ahead. Plan short iterations and adjust the plan planning far ahead. Plan short iterations and adjust the plan as you go.as you go.

7Coming up: Typical PrescriptiveRequirements Engineering Process

Coming up: Requirements Engineering-II 8

Typical PrescriptiveTypical PrescriptiveRequirements Engineering Requirements Engineering

ProcessProcess InceptionInception—ask a set of questions that establish …—ask a set of questions that establish … basic understanding of the problembasic understanding of the problem the people who want a solutionthe people who want a solution the nature of the solution that is desired, and the nature of the solution that is desired, and the effectiveness of preliminary communication and collaboration the effectiveness of preliminary communication and collaboration

between the customer and the developerbetween the customer and the developer ElicitationElicitation—elicit requirements from all stakeholders—elicit requirements from all stakeholders

to identify the problemto identify the problem propose elements of the solutionpropose elements of the solution negotiate different approaches, andnegotiate different approaches, and specify a preliminary set of solution requirementsspecify a preliminary set of solution requirements

ElaborationElaboration—create an analysis model that identifies data, —create an analysis model that identifies data, functional and behavioral requirementsfunctional and behavioral requirements

NegotiationNegotiation—agree on a set of requirements among all —agree on a set of requirements among all stakeholders (realistic, non-conflicting, inline with budget)stakeholders (realistic, non-conflicting, inline with budget)

Coming up: Typical Prescriptive Requirements Document Structure 9

Requirements Engineering-IIRequirements Engineering-II SpecificationSpecification—can be any one (or more) of the following:—can be any one (or more) of the following:

A written documentA written document A set of modelsA set of models A formal mathematicalA formal mathematical A collection of user scenarios (use-cases)A collection of user scenarios (use-cases) A prototypeA prototype

ValidationValidation—a review mechanism that looks for—a review mechanism that looks for errors in content or interpretationerrors in content or interpretation areas where clarification may be requiredareas where clarification may be required missing informationmissing information inconsistencies (a major problem when large products or inconsistencies (a major problem when large products or

systems are engineered)systems are engineered) conflicting or unrealistic (unachievable) requirements. conflicting or unrealistic (unachievable) requirements.

Requirements managementRequirements management

Coming up: Analysis Model 10

Typical Prescriptive Typical Prescriptive Requirements Document Requirements Document

StructureStructure PurposePurpose Overall DescriptionOverall Description System Features (Functional Requirements/Use System Features (Functional Requirements/Use

Cases)Cases) External Interface Requirements External Interface Requirements

User interface requirements or standardsUser interface requirements or standards Hardware interfaces to other systemsHardware interfaces to other systems Software interfaces to other systemsSoftware interfaces to other systems Communication InterfacesCommunication Interfaces

Non-functional RequirementsNon-functional Requirements Appendices - analysis model diagramsAppendices - analysis model diagrams See SRS Template on CS421 Project PageSee SRS Template on CS421 Project Page

(provided by (provided by http://www.processimpact.com/ … but essentially from IEEE). … but essentially from IEEE).

Coming up: Use-Cases 11

Analysis ModelAnalysis Model Included to provide more clarification about Included to provide more clarification about

textual requirements (where needed)textual requirements (where needed) Elements of the analysis modelElements of the analysis model

Scenario-based elementsScenario-based elements Functional—processing narratives for software Functional—processing narratives for software

functionsfunctions Use-case—descriptions of the interaction between an Use-case—descriptions of the interaction between an

“actor” and the system“actor” and the system Class-based elements – Class-based elements – e.g. class diagrame.g. class diagram Behavioral elements – Behavioral elements – e.g. se.g. state diagram, sequence tate diagram, sequence

diagram, activity diagram, etc..diagram, activity diagram, etc.. Flow-oriented elementsFlow-oriented elements – e.g. data flow diagram – e.g. data flow diagram

Coming up: Use-Case Diagram 12

Use-CasesUse-Cases A collection of usage scenarios that describe the thread of usage of a A collection of usage scenarios that describe the thread of usage of a

systemsystem Each scenario is described from the point-of-view of an “actor”—a person Each scenario is described from the point-of-view of an “actor”—a person

or device that interacts with the software in some wayor device that interacts with the software in some way Each scenario answers the following questions:Each scenario answers the following questions:

Who is the primary actor, the secondary actor (s)?Who is the primary actor, the secondary actor (s)? What are the actor’s goals?What are the actor’s goals? What preconditions should exist before the story begins?What preconditions should exist before the story begins? What main tasks or functions are performed by the actor?What main tasks or functions are performed by the actor? What extensions might be considered as the story is described?What extensions might be considered as the story is described? What variations in the actor’s interaction are possible?What variations in the actor’s interaction are possible? What system information will the actor acquire, produce, or change?What system information will the actor acquire, produce, or change? Will the actor have to inform the system about changes in the external Will the actor have to inform the system about changes in the external

environment?environment? What information does the actor desire from the system?What information does the actor desire from the system? Does the actor wish to be informed about unexpected changes?Does the actor wish to be informed about unexpected changes?

Coming up: Use Case Description 13

Use-Case DiagramUse-Case Diagram

homeowner

Arms/disarmssystem

Accesses systemvia Internet

Reconfigures sensorsand related

system features

Responds toalarm event

Encounters anerror condition

systemadministrator

sensors

Each oval is a separate use case that has a description

Each oval is a separate use case that has a description

Each stick figure is an actor in your systemEach stick figure is an actor in your system

The block is an external system that interacts with your system. Any system you aren’t developing is external

The block is an external system that interacts with your system. Any system you aren’t developing is external

Use Case DescriptionUse Case Description ID - ID - A unique to reference this use case U01, U02, etc…) ObjectiveObjective - What is the ultimate objective of the use-case. What is it - What is the ultimate objective of the use-case. What is it

trying to achieve? trying to achieve? PriorityPriority – The overall priority of this use-case (Low, Medium, High)– The overall priority of this use-case (Low, Medium, High) SourceSource – Who is the main source of this use case. Who cares most about – Who is the main source of this use case. Who cares most about

this functionality? This should be the one person you would ask if there is this functionality? This should be the one person you would ask if there is a question about this use-case. (Make up a name and cite their: John a question about this use-case. (Make up a name and cite their: John Smith (End-user) here.)Smith (End-user) here.)

ActorsActors – Which actors/stakeholders are involved in the use-case?– Which actors/stakeholders are involved in the use-case? Flow of Events Flow of Events

Basic FlowBasic Flow - flow of events normally executed in the use-case - flow of events normally executed in the use-case Alternative Flow(s)Alternative Flow(s) - a secondary flow of events due to infrequent conditions - a secondary flow of events due to infrequent conditions Exception Flow(s)Exception Flow(s) - Exceptions that may happen during the execution of the use - Exceptions that may happen during the execution of the use

casecase IncludesIncludes - other use case IDs that are referenced in steps in the flow of - other use case IDs that are referenced in steps in the flow of

events.events. PreconditionsPreconditions - Any condition that must be satisfied before the use case - Any condition that must be satisfied before the use case

begins. If the condition is “User is logged in”, then the first step of the begins. If the condition is “User is logged in”, then the first step of the use case is NOT “User logs in”. They are already logged in if that is a pre-use case is NOT “User logs in”. They are already logged in if that is a pre-condition!condition!

Post conditionsPost conditions - The conditions that will be satisfied after the use case - The conditions that will be satisfied after the use case successfully completes (typically same as objective)successfully completes (typically same as objective)

Notes/IssuesNotes/Issues - Any relevant notes or issues that need to be resolved- Any relevant notes or issues that need to be resolved 14Coming up: Alternate and Exception Flows

Alternate and Exception FlowsAlternate and Exception Flows1.1. Basic FlowBasic Flow

1.1. User enters user nameUser enters user name

2.2. User enters password User enters password

3.3. User submits the formUser submits the form

4.4. Password is validated as correctPassword is validated as correct

5.5. Main menu is displayedMain menu is displayed

2.2. Alternate Flow 1: No password is present at step Alternate Flow 1: No password is present at step 1.41.41.1. System displays error message.System displays error message.

2.2. System continues at step 1.2System continues at step 1.2

3.3. Alternate Flow 2: Password is incorrect as step 1.4Alternate Flow 2: Password is incorrect as step 1.41.1. ……

4.4. Exception Flow 1: Database is unreachableException Flow 1: Database is unreachable1.1. System displays an unrecoverable error and exits.System displays an unrecoverable error and exits.

Coming up: Includes and Preconditions 15

Show when in the basic flow this happens and where you end up after the alt flow

You may not know when this happens. That’s okay

Includes and PreconditionsIncludes and Preconditions

Basic Flow User selects option

4 from main menu screen

… Preconditions:

User is logged in Includes:

None

Coming up: eXtreme Programming (XP): User Stories 16

Basic Flow User executes U2:

Login User selects option 4

from main menu screen

… Preconditions:

None Includes:

U2: LoginDon’t forget to show this on the use case diagram as “includes”Don’t forget to show this on the use case diagram as “includes”

eXtreme Programming (XP): eXtreme Programming (XP): User StoriesUser Stories

Serve as requirements within the XP/Scrum Serve as requirements within the XP/Scrum processprocess Written by Written by customerscustomers Time Estimated by Time Estimated by developersdevelopers Replaces large requirements documentsReplaces large requirements documents Represents anything that is “progress” to the customerRepresents anything that is “progress” to the customer Examples: Examples:

Students can purchase monthly parking passes online.Students can purchase monthly parking passes online. Parking passes can be paid via credit cards.Parking passes can be paid via credit cards. Parking passes can be paid via PayPalParking passes can be paid via PayPal Professors can input student marks.Professors can input student marks. Students can obtain their current seminar schedule.Students can obtain their current seminar schedule. ・・ Students can order Students can order

official transcripts.official transcripts.17Coming up: eXtreme Programming (XP): User Stories

eXtreme Programming (XP): eXtreme Programming (XP): User StoriesUser Stories

Short – 1 or 2 sentences. Usually supposed Short – 1 or 2 sentences. Usually supposed to fit on a 3x5 notecardto fit on a 3x5 notecard

Easy to estimate (project velocity)Easy to estimate (project velocity) Allows requirements to change frequently Allows requirements to change frequently

with less impactwith less impact Without accompanying validation tests may Without accompanying validation tests may

lead to misinterpretationlead to misinterpretation Difficult to scale to very large projectsDifficult to scale to very large projects Requires close customer contact to ensure Requires close customer contact to ensure

correct implementationcorrect implementation18

Coming up: Format for User Stories (CS421 only… not standard!)

Format for User Stories Format for User Stories (CS421 only… not standard!)(CS421 only… not standard!)

Unique IdentifierUnique Identifier Source Source – who should developer contact with questions – who should developer contact with questions

about this?about this? Story Story – short (1-3 sentence) high-level description of – short (1-3 sentence) high-level description of

story. When the developer plans to implement they story. When the developer plans to implement they should discuss with the customer the details. should discuss with the customer the details. As a [user role], I want to [goal], so I can [reason].As a [user role], I want to [goal], so I can [reason].

Time estimate Time estimate – how long in “ideal development time” – how long in “ideal development time” – time without meetings or any interruptions – time without meetings or any interruptions

Client’s Priority Client’s Priority – how important is the story to the – how important is the story to the client? (Low, Medium, High) client? (Low, Medium, High)

Coming up: The web has MANY references about User Stories and Use Cases. 19

The web has MANY references The web has MANY references about User Stories and Use about User Stories and Use

Cases. Cases. User Stories: User Stories: http://www.agile-software-http://www.agile-software-

development.com/search/label/user%20storiesdevelopment.com/search/label/user%20stories

Use Cases: Use Cases: http://alistair.cockburn.us/Use+case+fundamentalshttp://alistair.cockburn.us/Use+case+fundamentals

Which is better? Many arguments – here is one: Which is better? Many arguments – here is one: http://alistair.cockburn.us/Why+I+still+use+use+cashttp://alistair.cockburn.us/Why+I+still+use+use+caseses

Coming up: Agile and Traditional Requirements share more than they differ 20

Agile and Traditional Agile and Traditional Requirements share more than Requirements share more than

they differthey differ

Coming up: Negotiating Requirements 21

Coming up: Reasons we need to negotiate 22

Negotiating RequirementsNegotiating Requirements

Identify the key stakeholdersIdentify the key stakeholders These are the people who will be involved in the These are the people who will be involved in the

negotiationnegotiation Determine each of the stakeholders’ “win Determine each of the stakeholders’ “win

conditions”conditions” Win conditions are not always obviousWin conditions are not always obvious

NegotiateNegotiate Work toward a set of requirements that lead to “win-Work toward a set of requirements that lead to “win-

win”win”

Coming up: Requirements Rationale 23

Reasons we need to Reasons we need to negotiatenegotiate

DiscussDiscuss Large software systems must improve the Large software systems must improve the current situation. It is hard to anticipate the current situation. It is hard to anticipate the effects that the new system will have on the effects that the new system will have on the organizationorganization

DiscussDiscuss Prototyping is often required to clarify Prototyping is often required to clarify requirementsrequirements

NegotiateNegotiate Different users have different Different users have different requirements and priorities. There is a constantly requirements and priorities. There is a constantly shifting compromise in the requirementsshifting compromise in the requirements

NegotiateNegotiate System end-users and organizations System end-users and organizations who pay for the system have different who pay for the system have different requirementsrequirements

Coming up: Non-Functional Requirement Types 24

Requirements RationaleRequirements Rationale It is important to provide rationale with requirements It is important to provide rationale with requirements

This helps the developer understand the application This helps the developer understand the application domain and why the requirement is stated in its current domain and why the requirement is stated in its current formform

Particularly important when requirements have to be Particularly important when requirements have to be changed. The availability of rationale reduces the changed. The availability of rationale reduces the chances that change will have unexpected effectschances that change will have unexpected effects

In this class we’ll provide the requirement’s source and In this class we’ll provide the requirement’s source and assume they can contact the source to get a rationale if assume they can contact the source to get a rationale if needed instead of an explicit “rationale”. This is more needed instead of an explicit “rationale”. This is more “agile”“agile”

Coming up: Non-Functional Requirement Examples 25

Non-Functional Non-Functional Requirement TypesRequirement Types

Product requirementsProduct requirements Requirements which specify that the delivered product Requirements which specify that the delivered product

must behave in a particular way e.g. execution speed, must behave in a particular way e.g. execution speed, reliability, etc.reliability, etc.

Organizational requirementsOrganizational requirements Requirements which are a consequence of Requirements which are a consequence of

organizational policies and procedures e.g. process organizational policies and procedures e.g. process standards used, implementation requirements, etc.standards used, implementation requirements, etc.

External requirementsExternal requirements Requirements which arise from factors which are Requirements which arise from factors which are

external to the system and its development process e.g. external to the system and its development process e.g. interoperability requirements, legislative requirements, interoperability requirements, legislative requirements, etc.etc.

Remember: Non Functional = How the system

should do something

Coming up: Requirements must be testable 26

Non-Functional Non-Functional Requirement ExamplesRequirement Examples

Product requirementProduct requirement 4.C.8 It shall be possible for all necessary communication 4.C.8 It shall be possible for all necessary communication

between the APSE and the user to be expressed in the between the APSE and the user to be expressed in the standard Ada character set.standard Ada character set.

Organizational requirementOrganizational requirement 9.3.2 The system development process and deliverable 9.3.2 The system development process and deliverable

documents shall conform to the process and deliverables documents shall conform to the process and deliverables defined in XYZCo-SP-STAN-95.defined in XYZCo-SP-STAN-95.

External requirementExternal requirement 7.6.5 The system shall provide facilities that allow any user to 7.6.5 The system shall provide facilities that allow any user to

check if personal data is maintained on the system. A check if personal data is maintained on the system. A procedure must be defined and supported in the software that procedure must be defined and supported in the software that will allow users to inspect personal data and to correct any will allow users to inspect personal data and to correct any errors in that data.errors in that data.security, maintainability

constraint: quality

constraint: interoperability

Agile stories? How?

Coming up: Requirements: testable metrics 27

Requirements must be Requirements must be testabletestable Traditional requirements must be written so that they Traditional requirements must be written so that they

can be objectively verified. can be objectively verified.

XP requirements have explicit acceptance test cases XP requirements have explicit acceptance test cases written by the customers to solve this problem.written by the customers to solve this problem.

The problem with this requirement is its use of vague The problem with this requirement is its use of vague terms such as ‘errors shall be minimized”terms such as ‘errors shall be minimized” The system should be easy to use by experienced The system should be easy to use by experienced

controllers and should be organized in such a way that controllers and should be organized in such a way that user errors are minimized.user errors are minimized.

The error rate should be been quantifiedThe error rate should be been quantified Experienced controllers should be able to use all the Experienced controllers should be able to use all the

system functions after a total of two hours training. system functions after a total of two hours training. After this training, the average number of errors made After this training, the average number of errors made by experienced users should not exceed two per day.by experienced users should not exceed two per day.

Coming up: System Level Requirements 28

Requirements: testable Requirements: testable metricsmetrics

Property MeasureSpeed Processed transactions/second

User/Event response timeScreen refresh time

Size K BytesNumber of RAM chips

Ease of use Training timeNumber of help frames

Reliability Mean time to failureProbability of unavailabilityRate of failure occurrenceAvailability

Robustness Time to restart after failurePercentage of events causing failureProbability of data corruption on failure

Portability Percentage of target dependent statementsNumber of target systems

Coming up: Validating Requirements-I 30

Requirements ValidationRequirements Validation Concerned with demonstrating that Concerned with demonstrating that

the requirements define the system the requirements define the system that the customer really wantsthat the customer really wants

Requirements error costs are high so Requirements error costs are high so validation is very important validation is very important Fixing a requirements error after delivery Fixing a requirements error after delivery

may cost up to 100 times the cost of may cost up to 100 times the cost of fixing an implementation errorfixing an implementation error

Coming up: Validating Requirements-II 31

Validating Requirements-IValidating Requirements-I Is each requirement consistent with the overall objective for Is each requirement consistent with the overall objective for

the system/product? Work with all parties on this question!the system/product? Work with all parties on this question!

Is the requirement really necessary or does it represent an Is the requirement really necessary or does it represent an add-on feature that may not be essential to the objective of add-on feature that may not be essential to the objective of the system?the system?

Is each requirement bounded and unambiguous? (e.g. Is each requirement bounded and unambiguous? (e.g. testable)testable)

Does each requirement have attribution? That is, is a source Does each requirement have attribution? That is, is a source (generally, a specific individual) noted for each requirement? (generally, a specific individual) noted for each requirement?

Do any requirements conflict with other requirements?Do any requirements conflict with other requirements?

Coming up: Requirements Reviews 32

Validating Requirements-IIValidating Requirements-II

Is each requirement achievable in the technical environment that Is each requirement achievable in the technical environment that will house the system or product?will house the system or product?

Is each requirement testable, once implemented?Is each requirement testable, once implemented?

Does the requirements model properly reflect the information, Does the requirements model properly reflect the information, function and behavior of the system to be built.function and behavior of the system to be built.

Coming up: Requirements final thoughts… 33

Requirements ReviewsRequirements Reviews

Regular reviews should be held while the Regular reviews should be held while the requirements definition is being formulatedrequirements definition is being formulated

Both client and contractor staff should be Both client and contractor staff should be involved in reviewsinvolved in reviews

Reviews may be formal (with completed Reviews may be formal (with completed documents) or informal. Good documents) or informal. Good communications between developers, communications between developers, customers and users can resolve problems at customers and users can resolve problems at an early stagean early stage

Coming up: Requirements final thoughts… 34

Requirements final thoughts…Requirements final thoughts…

Requirements should specify one and only one Requirements should specify one and only one thingthing Requirements and User Stories can only pass or fail, they Requirements and User Stories can only pass or fail, they

can’t partially pass. If you want to partially pass a can’t partially pass. If you want to partially pass a requirement split into tworequirement split into two

Requirements must be testableRequirements must be testable Requirements must specify what YOUR system Requirements must specify what YOUR system

must do, not what other (external) systems domust do, not what other (external) systems do To make this easier, in this class all functional To make this easier, in this class all functional

requirements must begin with requirements must begin with “The system shall…”“The system shall…” Must have a source (make it up for CS421)Must have a source (make it up for CS421)

Coming up: Requirements must have a unique ID 35

Requirements final thoughts… Requirements final thoughts…

Should not be a design choice (this is hard to get right). Should not be a design choice (this is hard to get right). The system shall store user information including name, DOB, The system shall store user information including name, DOB,

address and SSN. <-- Good!address and SSN. <-- Good!

The system shall store user information in an Oracle database The system shall store user information in an Oracle database including name, DOB, address, SSN. <-- including name, DOB, address, SSN. <-- badbad

Is Oracle really REQUIRED? Hard to say… maybe, but probably not. Is Oracle really REQUIRED? Hard to say… maybe, but probably not. This is a decision you would make at implementation design time. This is a decision you would make at implementation design time.

Question: Does the customer care that you use Oracle? MySQL? Etc.. Question: Does the customer care that you use Oracle? MySQL? Etc.. Maybe someone found some other MUCH BETTER approach storing Maybe someone found some other MUCH BETTER approach storing the data on moon rocks.the data on moon rocks.

Again: This is hard to avoid… and I’m not to concerned with it on the Again: This is hard to avoid… and I’m not to concerned with it on the SRS, but I want you to be very aware of when you are making design SRS, but I want you to be very aware of when you are making design choices instead of required features.choices instead of required features.

Coming up: Bad Example Requirements Statements 36

Requirements must have a Requirements must have a unique IDunique ID

Must have a unique ID. Must have a unique ID.

When testing you need to reference REQ-1 or REQ-287. When testing you need to reference REQ-1 or REQ-287. Multiple things cannot be labeled REQ-1. Multiple things cannot be labeled REQ-1.

Later our test cases will say: This test case validates Later our test cases will say: This test case validates requirements REQ-1, REQ-27, and REQ-56. requirements REQ-1, REQ-27, and REQ-56.

Coming up: Bad Examples 37

Bad Example Requirements Bad Example Requirements StatementsStatements

Bad requirements examples:Bad requirements examples: The system shall validate and accept credit cards and The system shall validate and accept credit cards and

cashier’s checks. High priority.cashier’s checks. High priority.

The system shall process all mouse clicks very fast to The system shall process all mouse clicks very fast to ensure user’s do not have to wait.ensure user’s do not have to wait.

The user must have Adobe Acrobat installed.The user must have Adobe Acrobat installed.

These don’t have a source or unique ID, but what else is wrong?

Coming up: The Result of Good Requirements 38

Bad ExamplesBad Examples The system shall validate and accept credit cards and The system shall validate and accept credit cards and

cashier’s checks. High priority.cashier’s checks. High priority. Problem: two requirements instead of one. Problem: two requirements instead of one. If the credit card processing works, but the cashier’s check If the credit card processing works, but the cashier’s check

validation does not… is this requirement pass or fail? Has to validation does not… is this requirement pass or fail? Has to be fail, but that is misleading. be fail, but that is misleading.

Maybe only credit cards are high priority and cashier’s checks Maybe only credit cards are high priority and cashier’s checks are low priority.are low priority.

The system shall process all mouse clicks very fast to The system shall process all mouse clicks very fast to ensure user’s do not have to wait.ensure user’s do not have to wait.

Problem: This is not testable. Quantify how fast is acceptable?Problem: This is not testable. Quantify how fast is acceptable? The user must have Adobe Acrobat installed. The user must have Adobe Acrobat installed.

Problem: This is not something our system must do. It could Problem: This is not something our system must do. It could be in the constraints/assumptions or maybe operating be in the constraints/assumptions or maybe operating environment sections, but is not a functional requirement of environment sections, but is not a functional requirement of our systemour system

Coming up: Inception 39

The Result of Good The Result of Good RequirementsRequirements

I’m melting!

Your wicked problems melt into small manageable problems ….