Professional Documents
Culture Documents
Outline
Why use cases?
What are actors and use cases? How do we write use cases?
2
Copyright 2002-2004 Serlio Software Development Corporation
Unstable Requirements
Leading cause of runaway projects* Most expensive errors to fix Hardest errors to correct
User involvement is key
*Facts and Fallacies of Software Engineering, Robert L. Glass, 2003, Addison-Wesley 3
Copyright 2002-2004 Serlio Software Development Corporation
100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% < $750k $750k $1.5M $1.5M - $3M $3M - $6M $6M - $10M > $10M
Total Cost
4
Copyright 2002-2004 Serlio Software Development Corporation
Requirements Specifications
Easily misunderstood Too large to comprehend Hard to test for completeness Provide no context
5
Copyright 2002-2004 Serlio Software Development Corporation
Outline
Why use cases?
What are actors and use cases? How do we write use cases?
7
Copyright 2002-2004 Serlio Software Development Corporation
What Is An Actor?
A role, not a person Human or non-human Three essential traits
External to the system Interacts with the system Tries to achieve a goal
Copyright 2002-2004 Serlio Software Development Corporation
Claims adjuster
9
Copyright 2002-2004 Serlio Software Development Corporation
11
Copyright 2002-2004 Serlio Software Development Corporation
Types of Requirements
Functional Non-Functional
Usability Reliability Portability Supportability + (legal)
Terminology
The system should generate insurance quotes. The system should handle 30,000 quote requests per hour.
12
Outline
Why use cases?
What are actors and use cases? How do we write use cases?
13
Copyright 2002-2004 Serlio Software Development Corporation
Identify Actors
Actor Name:
Customer
Description:
A customer is an individual or business that currently has a relationship with the bank. For the purposes of the loan management system, a customer is someone who holds an active loan account or has been extended credit.
Goals:
Be informed of a payment due Make a loan payment Check loan balance
15
Copyright 2002-2004 Serlio Software Development Corporation
Use a short, verb-noun combination Describe the interaction Reflect the actors goal
16
Copyright 2002-2004 Serlio Software Development Corporation
Insurance Quoter
Buy Coverage
17
Copyright 2002-2004 Serlio Software Development Corporation
Brief
Primary Scenario
Fully Dressed
18
Copyright 2002-2004 Serlio Software Development Corporation
Alternate/Extension
Primary Flow (Interaction) Alternate/Extension
Alternate/Extension
19
Copyright 2002-2004 Serlio Software Development Corporation
Primary Flow
Cancel Order Use Case Flow of Events 1. The use case begins when the customer rep asks the system to cancel an order. 2. The customer rep searches for the order by order ID. 3. The system presents the order. 4. The customer rep marks the order as cancelled. 5. The system cancels the order. 6. The system tells the accounting subsystem to credit the customers account.
20
Copyright 2002-2004 Serlio Software Development Corporation
Preconditions
Defines use case scope and place
What has already happened?
21
Copyright 2002-2004 Serlio Software Development Corporation
Precondition Examples
The broker is logged on. The order status is complete. The quote is valid. The divert location is in service.
22
Copyright 2002-2004 Serlio Software Development Corporation
Postcondition
A.K.A Success Guarantee Required state of the system Written as an assertion, past tense Describes the satisfied interests
23
Copyright 2002-2004 Serlio Software Development Corporation
Postcondition Examples
The email was sent. The file was saved. The policy was cancelled. The system credited the customers account.
24
Copyright 2002-2004 Serlio Software Development Corporation
Extensions
We know the main success scenario The world doesnt work this way Software is no exception We need a way to describe:
Failure conditions Alternative/conditional steps in the flow
25
Copyright 2002-2004 Serlio Software Development Corporation
Extensions: Mechanics
Insertion point Extension condition Alternate steps
26
Copyright 2002-2004 Serlio Software Development Corporation
27
Copyright 2002-2004 Serlio Software Development Corporation
Extension Example
Pack Order: 5. The packing clerk scans the item and places it in the carton. 6. The system records that the item was packed and updates the order. Extensions: *a. The order management system is unavailable. 1. 6a. The item does not belong on the order. 1. 6b. The order was cancelled. 1. 6c.The item has been recalled.
28
Copyright 2002-2004 Serlio Software Development Corporation
Summary
Why use cases?
What are actors and use cases? How do we write use cases?
29
Copyright 2002-2004 Serlio Software Development Corporation