55
Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 1 In Search of Excellent Requirements Neil Potter, Mary Sakry The Process Group [email protected] www.processgroup.com Licensed from Karl E. Wiegers

In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Embed Size (px)

Citation preview

Page 1: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 1

In Search of

Excellent Requirements

Neil Potter, Mary Sakry

The Process Group

[email protected]

www.processgroup.com

Licensed from Karl E. Wiegers

Page 2: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 2

Have You Had Any of These Experiences?

! The project’s vision and scope are never clearly

defined.

! Customers are too busy to spend time working withdevelopers on the requirements.

! User surrogates (managers or marketing) claim to

speak for the users, but they really don’t.

! Users claim that all the requirements are critical and do

not prioritize them.

! Developers encounter ambiguities and missing

information and they guess.

Page 3: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 3

Have You Had Any of These Experiences?

! Your customers sign off on the requirements thenchange them continuously.

! The scope increases as requirements changes areaccepted, but the schedule slips because moreresources are not provided.

! Requested requirements changes get lost and thestatus of a change request is not known.

! Functionality is requested and built, but never used.

! The specification is satisfied, but the customer is

not.

Page 4: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 4

Agenda

" Introduction

" Requirements Development and Management Process

# Identify users

# Define vision and scope

# Understand user needs

# Derive functional requirements

# Analyze and verifying requirements

# Manage requirements changes

Further resources at: http://www.processgroup.com/downloads.htm

Page 5: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 5

Introduction

Page 6: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 6

Three Levels of Software Requirements

#2: UserRequirements

Software Requirements Specification (SRS)

Constraints

BusinessRules

QualityAttributes

SystemRequirements

Vision and Scope Document

Use Case Document

Other NonfunctionalRequirements

External Interfaces

#3:FunctionalRequirements

#1: BusinessRequirements

Page 7: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 7

Benefits of Requirements Processes

" Creating and reviewing multiple views ofrequirements helps satisfy customer expectations.

" Controlling requirements changes minimizes

the adverse impact of changes.

" Emphasizing quality requirements reduces rework,

maintenance and wasted time implementingunnecessary functions.

" System testing can be based on requirements.

Page 8: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 8

Relative Cost of Fixing a Defect

[Robert Grady, Applications of Software Measurement Conference, 1999]

0

10

20

30

40

50

60

70

Requirements Design Code DevelopmentTesting

AcceptanceTesting

Operation

Development Phase

Rela

tive C

ost

to C

orr

ect

a D

efe

ct

Page 9: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 9

The Requirements Job

" Learn about the business, its language, and the objectivesof the solution.

" Sort out requirements information and structure into anSRS.

" Help identify and remove requirements ambiguities.

" Help establish requirements priorities.

" Clarify scope and context of solution with other systems.

" Educate users / customers on how to use / read therequirements.

" Assist in decisions regarding requirements changes andtradeoffs.

Page 10: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 10

• Requirements problems / issues?• Expectations for this class?

Your Expectations

Page 11: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 11

Requirements Development& Management Process

StartIdentifyUsers

Define Vision

& Scope

UnderstandUser Needs

DeriveFunctional

Requirements

Analyze &Verify

Requirements

Manage Requirements

Changes

Page 12: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 12

Identify Users

StartIdentifyUsers

Define Vision

& Scope

UnderstandUser Needs

DeriveFunctional

Requirements

Analyze &Verify

Requirements

Manage Requirements

Changes

Page 13: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 13

User Classes

" Distinct groups of users for a product

# Could include other systems as users of yoursystem

" May differ in:

# frequency of use of application

# functions used

# tasks to be accomplished

# education and skill level

# privilege or security level

" Identify user classes and their characteristicsearly

" Document user classes in the SRS

" Not all user classes are equally important to you

e.g., doctor,

nurse, office

manager

Your

System

User

System

Page 14: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 14

User Class Example

" Scheduling / billing system User Classes and tasks:

# Office assistant:

! Daily patient scheduling, patient billing

# Office manager:

! Monthly reporting, complaint management

# System administrator:

! Database maintenance and recovery

# Doctor:

! Schedule summary, scheduling strategy changes (#minutesper patient, blackout days, on-call doctor availability,emergency patient information access, remote data access)

A lack of understanding of your user classes can lead to major

omissions in functionality and reduced customer satisfaction.

Page 15: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 15

The Product Champion

" Primary interface between developmentand customer communities

# Represents a user class or system interface

" Respected members of the user community

" A real user; not a manager, sponsor,or simulated user

" Has a vision of what the product should be and do

" Reconciles incompatible customer requirements

" Must be empowered to make binding decisions

Your

System

User

System

Page 16: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 16

Potential Product Champion Activities

Planning: $ Define scope and limitations of system$ Define external boundaries and interfaces

$ Plan migration pathway from current system to new one

$ Interview other users they represent$ Resolve conflicting requirements$ Set implementation priorities

$ Define quality attributes

$ Participate in requirements inspections (reviews)

$ Evaluate / prioritize bug fixes and enhancements

$ Contribute to user manuals and on-line help$ Help prepare classes and tutorial materials

$ Help “sell” the system to customer communities

Requirements:

ChangeManagement:

Documentation:

Advocacy:

Page 17: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 17

Define Vision and Scope

StartIdentifyUsers

Define Vision

& Scope

UnderstandUser Needs

DeriveFunctional

Requirements

Analyze &Verify

Requirements

Manage Requirements

Changes

Page 18: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 18

Three Levels of Software Requirements

Define Vision

& Scope

#1: BusinessRequirements

#2: UserRequirements

Software Requirements Specification (SRS)

Constraints

BusinessRules

QualityAttributes

SystemRequirements

Vision and Scope Document

Use Case Document

Other NonfunctionalRequirements

External Interfaces

#3:FunctionalRequirements

Page 19: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 19

Vision and Scope Document

1. Business Requirements

1.1. Background1.2. Business Opportunity1.3. Business Objectives and Success

Criteria1.4. Customer or Market Needs1.5. Business Risks

2. Vision of the Solution

2.1. Vision Statement2.2. Major Features2.3 Assumptions and Dependencies

3. Scope and Limitations

3.1. Scope of Initial Release

3.2. Scope of Subsequent Releases

3.3. Limitations and Exclusions

4. Business Context4.1. Customer Profiles4.2. Project Priorities4.3. Operating Environment

Page 20: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 20

Some Elicitation Questions: Business Reqs.

" What business problem are you trying to solve?

" What’s the motivation for solving this problem?

" What would a highly successful solution do for you?

" How can we judge the success of the solution?

" What’s a successful solution worth?

" Which business activities and events should be includedin the solution? Which should not?

Page 21: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 21

Vision and Scope Document

1. Business Requirements1.1. Background1.2. Business Opportunity1.3. Business Objectives and

Success Criteria1.4. Customer or Market Needs1.5. Business Risks

1. Allow customers world wide to make and track purchases for all

consumable products using a web browser.

2. Allow payment to be made electronically using existing or new accounts.

3. Provide customer with Internet access to accounts payable and receivable

functions on existing accounts.

4. Capture needs profile of each customer for future marketing use.

5. …

• Eliminate paper-based orders from

world-wide customers by

providing a web system for order

management.

• Replace all paper transactions by

200X.

• Reduce order management costs

30% by 200Y.

e.g.,

e.g.,

Page 22: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 22

Another Example - Customer Needs

Req # CURRENT ACCOUNTS

CA 1.1 A/C to A/C transfer (XXX accounts)

CA 1.2 A/C to A/C transfer (to other local banks)

CA 1.3 Transfer from XXX A/C to a Beneficiary through a XXX Branch

CA 1.4 A/C to A/C transfer (to international banks thru pre-defined transfer)

CA 1.5 Utility bill payments

CA 1.6 Request additional XXX ATM card

CA 1.7 Report lost/stolen XXX ATM card with option to request a replacement

CREDIT CARD

CC 1.1 Apply for a XXX VISA / MasterCard

CC 1.2 XXX VISA/MasterCard credit card payment with the option to pay for another XXX credit card

CC 1.3 Transfer from XXX VISA / MasterCard to Current A/C

CC 1.4 Change of XXX VISA / MasterCard address

TIME DEPOSIT

TD 1.1 Book a Time Deposit from a current account

TD 1.2 Commission Rate Inquiry/Display Rates

TD 1.3 Change interest account assignment

PERSONAL FINANCE

PF 1.1 Apply for Consumer Loan

PF 1.2 Inquiry on loan outstanding amount, installment amount, due amount

PF 1.3 View loan statement

FINANCIAL PLANNING

FP 1.1 Plan Details

FP 1.2 Payment Details

FP 1.3 Investment Details

FP 1.4 Benefit Details

Page 23: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 23

Vision and Scope Document

2. Vision of the Solution

2.1.Vision Statement2.2.Major Features2.3 Assumptions

Context Diagram

Our

System

Internal &

Corporate

Clients

Sales

Staff

Suppliers• The system namegoes in the circle

• Outside boxesrepresent majorexternal entities

• Flows betweenexternals and thesystem comprehendhigh-level user needs

Buy/trackResponse

Buy/trackRequest

Buy/trackRequest

Buy/trackResponse

Auto StockRequest

Auto StockResponse

Rep

ortin

g$

Que

ries

Reporting

New a/c Set up +Needs MarketingQueries + Audit Trail

Exec.

Mgt.

Retail

Stores

Page 24: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 24

Exercise: Business Requirements

" Write 1-2 business objectives for one of your projects

" Write 1-2 business requirements for one of your projects:

# Focus on Customer or Market Needs

! Include the needs of a typical customer and the needs that are notbeing met

! Include problems that customers are currently having that theproduct will address

Page 25: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 25

Understand User Needs

StartIdentifyUsers

Define Vision

& Scope

UnderstandUser Needs

DeriveFunctional

Requirements

Analyze &Verify

Requirements

Manage Requirements

Changes

Page 26: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 26

Three Levels of Software Requirements

#1: BusinessRequirements

#2: UserRequirements

Software Requirements Specification (SRS)

Constraints

BusinessRules

QualityAttributes

SystemRequirements

Vision and Scope Document

Use Case Document

Other NonfunctionalRequirements

External Interfaces

#3:FunctionalRequirements

Define Vision

& Scope

Page 27: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 27

The Need for Customer Involvement

Customer involvement is a

critical factor in software quality.

What the customer wants

What the developer builds

Expectation Gap

Surprise!

Time

Page 28: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 28

Don’t necessarily clarify

all user needs for the

whole system initially.

Consider focusing on

areas that are the:

" Highest priority

" Most frequently used

" Highest revenue

" Largest user class

" Core features to support

architecture

" Reqs. for regulatory

compliance

Incremental Requirements Definition

Page 29: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 29

Sources of Software Requirements - 1

" Documents

# descriptions of current or competing products

# standards or regulations

# help desk problem reports

" Interviews

# focus groups of representative customers

# use case workshops with users + developers

# product champions as key customer representatives

" Questionnaires and marketing surveys

# good for large number of responses

# ask the right people the right questions!

# run a pilot first

Page 30: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 30

Sources of Software Requirements - 2

" Watch users do their jobs

# create workflow diagrams

# “day in the life” studies

# look at what information the user has when performing aparticular task

" Prototyping

# useful for requirements, design, and implementation

" Task analysis

# apply methods like use cases or scenarios

# focus on user objectives, rather than system functions

" Event-response tables

# identify external stimuli and describe system responses

Page 31: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 31

Classifying the Voice of the Customer

External

Interface

Requirement

Functional

Requirement

Solution IdeaBusiness Rule

ConstraintQuality Attribute

Business Requirement

Use Case

or Scenario

Data Definition

Page 32: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 32

Use Cases

Page 33: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 33

Gathering Requirements Through Use Cases

" Use cases came from object-oriented world, extended for systemanalysis and user interface design

" Provides a method to capture user requirements

" Focus on actual, but abstracted (“essential”) usage scenarios

" Ask users:

“Describe a task (or goal) you need to perform.”

not:

“What do you want this system to do?”

" Explore sequences of user actions and system responses

" Derive functional requirements and test cases from use cases

Page 34: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 34

Use Case in Context

Use Case

Workshops

Use Case

DescriptionsDraft Test

Cases

Verified

SRS

Draft Models

Draft SRS

Business

Rules

Verified

Models

Shared

Vision

Page 35: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 35

Use Case Workshop Approach

Preconditions: database contains orders,

user identity is verified

Postconditions: order has been shown

Use Case Name:

User Classes: all

View an order stored in the database.

Actor Actions System Responses

user enters order

number he wants

to view

user enters order

number, but it

doesn’t exist

error message:

order number

not found

order details

are displayed

etc. for all normal

and exception

pathways

Raw Interview Data

Page 36: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 36

Benefits from the Use Case Approach

" User-centric: user’s terminology is applied

" Task-centric: reveals requirements to get work done

" Helps analysts understand application domain

" Avoids building unnecessary functionality

" Permits early drafting of functional test cases

" Helps set implementation priorities on functionalrequirements (i.e., which is the most important user task?)

" Permits tracing requirements back to voice of thecustomer

Page 37: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 37

Examples of Use Case Statements

" Order a bottle of a specific chemical from a specificvendor.

" Search a document collection for a specific template.

" See which flight has the lowest fare from city A to city Bon a specified date.

# with an advance ticket purchase

# without an advance ticket purchase

" Pay for a purchase made at a commercial website.

" Output data every 3 milliseconds in JJU format.

" Update interest rate based on loan database update.

Page 38: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 38

Graphical Option - Use Case Diagrams

Obtain MaterialSafety Data

Sheet

Search VendorCatalogs

Request aChemical

ReceiveChemical

ManageInventory

CheckOrderStatus

Dispose ofa ChemicalHealth &

Safety Dept.

TrainingDatabase

ChemicalStockroom

StaffRequester

Buyer

Takes upspace!

Page 39: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 39

Sample Use Case for an ATM - 1

Name: Withdraw Cash

Actor: Account Owner

Description:The user withdraws a specific amount of cash from a specified account.

Trigger: Account Owner selects Withdrawal action.

Preconditions:1. The Account Owner is logged in to the ATM.2. The Account Owner has at least 1 account with a positive balance.3. The ATM contains cash.

Postconditions:1. The requested amount of cash has been dispensed.2. The account balance is reduced by the amount withdrawn plus any fees.3. The ATM cash balance is reduced by the amount withdrawn.

Priority: High

Page 40: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 40

Sample Use Case for an ATM - 2

Actor Actions System Responses

1. Select Withdrawal action.3. Select desired account.5. Enter desired amount.7. Remove cash from dispenser.

2. Display user’s accounts.4. Ask user to enter amount.6. If amount is okay, dispense

cash and debit account.

" Alternative Flow:

# Step 4: display list of common amounts, let user select one

" Exceptions:

# Step 6: amount is not a multiple of $20.00# Step 6: amount exceeds $400# Step 6: amount exceeds account balance# Step 6: amount exceeds cash available in ATM

" Normal flow:

Page 41: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 41

Use Case Template

" Actor: a human user or other system that provides the trigger

" Trigger: event that causes your system to respond

" Pre/post conditions: bounds the use case to avoid major design flaws

" Alternative flow: alternative route to accomplish Use Case

" Exceptions: describes how the system reacts to bad input

Use Case ID:

Use Case Name:

Created By: Last Updated By:

Date Created: Date Last Updated:

Actors:

Description:

Trigger:

Preconditions:

Postconditions:

Normal Flow: Actor Actions System Response

Alternative Flows:

Exceptions:

Includes:

Priority:

Frequency of Use:

Business Rules:

Special Requirements:

Assumptions:

Notes and Issues: Notes and Issue s Resolut ions

Page 42: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 42

Use Cases and Business Requirements - 1

Business RequirementsEliminate paper-based orders from world-wide customers by providing a web system

for order management. Replace all paper transactions by 200X. Reduce order

management costs 30% by 200Y.

1) Allow customers world wide to make and track purchases for all consumable

products using a web browser.

2) Allow payment to be made electronically using existing or new accounts.

3) Provide customer with Internet access to accounts payable and receivable functions

on existing accounts.

4) Capture needs profile of each customer for future marketing use.

5) Provide customizable reporting of system use to executive management (reporting

to be defined).

6) Provide simple transaction reporting summary to customers (reporting to be

defined).

7) Support sales force in creating and managing Internet accounts for customers.

8) Eliminate all lost sales due to incorrectly routed paper orders.

9) Provide audit / verification mechanism to verify orders received and shipped.

Page 43: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 43

Use Cases and Business Requirements - 2

Obtain a list of use case names (actor

tasks) before expanding each use case.

Example Use Cases for Business Requirement #7.

1. Register a site admin– by site admin.

2. Create a new site admin profile – by site admin.

3. Modify site admin profile – by site admin.

4. Remove the site admin profile – by site admin.

5. Register a new user - by site admin.

6. Remove an existing user - by site admin.

7. View own profile - by user.

8. Modify own profile - by user.

Page 44: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 44

Example Use Case #2 - slide 1/3

Use Case ID US2.

Use Case Name Create a new site admin profile.

Created By

Date Created

Last Updated By

Date Last Updated

Actor Sales Administrator.

Description Create a site admin profile for a customer. The site admin can then create

users.

Trigger Select <new site admin profile>

Preconditions Site admin has a valid license ID to enter.

Site admin will have a list of user membership names & email addresses to

enter for this new profile.

Postconditions A new site admin ID will be created for the customer. The site admin can then

access this profile and delegate management of the profile to users under

him/her.

Page 45: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 45

Example Use Case #2 - slide 2/3

Normal Flow—User Actions Normal Flow—System Responses

1. The site admin will log in with new license ID.

3. Enter the user ID.

5. The admin can set a flag to specify an “admin

only” user, where he/she can administer other users

– but cannot do any transactions.

6. Enter user membership names and email

addresses for new profile.

9. Log off.

2. Display screen to create the new profile.

4. Check if member profile exists.

• (If the member profile does not exist

then the user must first register at the

www.xxx.com site (to create a member

profile), and then only the Profile can be

created.)

7. Insert the site admin profile in the database.

8. Display confirmation that new profile has

been created. Email copy of profile

information to site admin.

Page 46: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 46

Example Use Case #2 - slide 3/3

Alternative Flow - User Actions Alternative Flow - System Responses

The admin may assign user membership

names to the newly created site admin

profile using the ABC toolkit.

None.

Exceptions - User Actions Exceptions - System Responses

A1. If the site admin profile already

exists.

B1. If the user or site admin that is to be

added is not in the www.xxx.com

membership accounts list.

A2. Site admin not added. The site admin is prompted to

use the modify option.

B2. Site admin not added. An error will be displayed and

the user will have to first register at the www.xxx.com

site, before his/her profile can be created.

B3. Open new browser window for www.xxx.com

Business Rule: BR1: Only allow membership names from approved

counties (see approved-list.doc )

Special Requirements The site admin should be able to maintain his/her own

profile and should be able to add more users under

him/he r .

Assumptions Site admin must use Internet Explorer 5.X or greater.

All existing site admin profiles remain unaltered.

Notes and Issues Resolutions

Can an admin add another admin? Will

there be more than one admin who will

be adding/modifying the same profile?

Yes, an admin can create another admin and more than

one admin can modify the same profile.

Page 47: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 47

" Elicit several proposed use case names for your system.

Exercise: Use Cases

Example Use Cases for Business Requirement #7.

1. Register a site admin– by site admin.

2. Create a new site admin profile – by site admin.

3. Modify site admin profile – by site admin.

4. Remove the site admin profile – by site admin.

5. Register a new user - by site admin.

6. Remove an existing user - by site admin.

7. View own profile - by user.

8. Modify own profile - by user.

Page 48: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 48

Derive Functional Requirements

StartIdentifyUsers

Define Vision

& Scope

UnderstandUser Needs

DeriveFunctional

Requirements

Analyze &Verify

Requirements

Manage Requirements

Changes

Page 49: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 49

Three Levels of Software Requirements

DeriveFunctional

Requirements

#1: BusinessRequirements

#2: UserRequirements

Software Requirements Specification (SRS)

Constraints

BusinessRules

QualityAttributes

SystemRequirements

Vision and Scope Document

Use Case Document

Other NonfunctionalRequirements

External Interfaces

#3:FunctionalRequirements

Page 50: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 50

Deriving Functional Requirements

" Two common styles of defining Functional Requirements:

# 1: Functional requirements = complete rewrite of the user requirementsfrom a system / developer perspective, e.g.,

! Feature A: <description, use case(s) it implements, characteristics>

! Feature B: <description, use case(s) it implements, characteristics>

# 2: Functional requirements = ADDITIONAL software characteristics thatmore completely define system behavior, at the level that designers candesign without causing significant rework and defects, e.g.,

! Ensure record locking for database X

! Don’t allow control characters in the password

! Process empty records by flagging them as null

You might decide that some of the functional requirements aremore appropriately recorded as user requirements

Page 51: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 51

Functional Requirements Example - Style 2

No system use will be possible if the license is invalid. The site admin will be asked for a

license renewal number annually.

The system will remember partial profile creations, should the site admin not complete the

profile creation process at one time. The site admin will be able to continue where he/she left

off.

The admin tool will not provide any record locking and will depend on the default record

locking provided by the database.

If a user profile is being modified simultaneously by 2 site admins, then the profile in the

database will be the profile that was last updated.

There will be only one site admin per user .

User membership names and email addresses shall be typed in or imported from a delimited

file. The site admin can specify the delimiters used in the ascii file.

Business Requirement 7:

Support sales force in creating and managing Internet accounts for customers.

Use Case 2: Create a new site admin profile.

Functional Requirements for Use Case 2:

Page 52: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 52

Exercise: Writing Functional Requirements, SystemRequirements, External Interfaces and Constraints

" Select one use case. Write several functional requirementsthat, if implemented, would allow the user to perform thatuse case.

# Assume: Functional requirements = ADDITIONAL softwarecharacteristics that more completely define system behavior.

" Identify System Requirements, External Interfaces andConstraints for a section of your project.

Page 53: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 53

Q&A

Page 54: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 54

For Further Reading - 1

Beyer, Hugh, and Karen Holtzblatt. Contextual Design: Defining Customer-CenteredSystems. San Francisco: Morgan Kaufmann Publishers, 1998.

CMMI Product Development Team. CMMI for Development. Version 1.2 (CMMI-DEV,v1.2). CMU/SEI-2006-TR-008CMU/SEI-2006-TR-008, ESC-TR-2006-008. August 2006.

Collard, Ross. “Test Design”, Software Testing & Quality Engineering, vol. 1, no. 4(July/August 1999), pp. 30-37.

Gause, Donald C., and Brian Lawrence. “User-Driven Design,” Software Testing &Quality Engineering, vol. 1, no. 1 (January/February 1999), pp. 22-28.

Gottesdiener, Ellen. Requirements by Collaboration: Workshops for Defining Needs.Boston: Addison-Wesley, 2002.

Gottesdiener, Ellen. The Software Requirements Memory Jogger. Salem, NH:Goal/QPC, 2005.

IEEE Std. 830-1998, "Recommended Practice for Software RequirementsSpecifications." Los Alamitos, Calif.: IEEE Computer Society Press, 1998.

Kulak, Daryl, and Eamonn Guiney. Use Cases: Requirements in Context, 2nd Ed.Boston: Addison-Wesley, 2003.

Page 55: In Search of Excellent Requirements - · PDF fileThe specification is satisfied, but the customer is ... " Primary interface between development and customer communities ... CC 1.1

Based on In Search of Excellent Requirements, Copyright © 2007 by Karl E. Wiegers. Modifications & additions Copyright © 2007 The Process Group. www.processgroup.com Version 9.8L-2 PGv9 55

For Further Reading - 2

Lauesen, Soren. Software Requirements: Styles and Techniques. London: Addison-Wesley, 2002.

Leffingwell, Dean, and Don Widrig. Managing Software Requirements: A Use CaseApproach, 2nd Ed. Reading, Mass.: Addison Wesley, 2003.

Robertson, James and Suzanne Robertson. Complete Systems Analysis: The Workbook,the Textbook, the Answers. New York: Dorset House, 1994.

Sommerville, Ian, and Pete Sawyer. Requirements Engineering: A Good Practice Guide.New York: John Wiley & Sons, 1997.

Wiegers, Karl E. Creating a Software Engineering Culture. New York: Dorset House, 1996.

Wiegers, Karl E. Peer Reviews in Software: A Practical Guide. Boston: Addison-Wesley,2002.

Wiegers, Karl E. Software Requirements, 2d Ed. Redmond, Wash.: Microsoft Press, 2003.

Wiegers, Karl E. More About Software Requirements: Thorny Issues and Practical Advice.Redmond, Wash.: Microsoft Press, 2006.

Wiegers, Karl. “Karl Wiegers Describes 10 Requirements Traps to Avoid,” Software Testing& Quality Engineering, vol. 2, no. 1 (January/February 2000), pp. 34-40.