Upload
dolien
View
229
Download
2
Embed Size (px)
Citation preview
Sponsored by:
The Use Case Technique:An Overview
Karl Wiegers
Principal Consultant, Process Impact
www.processimpact.com
2
Sponsor: CEG
Tailored Corporate Training
Open-Enrollment Courses
Multiple Delivery Methods
Learn from Certified Industry Practitioners• BA, PM, PRINCE2, BPM, M&L
Earn a Business Analysis Certificate through our Duke University Alliance
Endorsed Education Provider for IIBA®
Save 20% on training* with promo code: MAWEB14
Free BA online training demo: http://bit.ly/BAdemo
View course schedule at www.corpedgroup.com
Phone #:
E-mail:
3
Sponsored By
Blog:
Featured Speaker
Karl Wiegers
Principal Consultant, Process Impactwww.processimpact.com
503-698-9620
Consulting Tips & Tricks Blog: www.karlconsulting.blogspot.com
Downloadable Process Goodies: www.processimpact.com/goodies.shtml
Sponsored By
4
Source Books
More About Software Requirements, by Karl E. Wiegers (Microsoft Press, 2006)
Use Cases: Requirements in Context, 2nd Edition, by Daryl Kulak and Eamonn Guiney (Addison-Wesley, 2003)
Software Requirements, 3rd Edition, by Karl Wiegers and Joy Beatty (Microsoft Press, 2013)
amzn.to/1auzx1M
Sponsored By
5
Agenda
Use cases defined
Use cases and user stories
Benefits of the usage-centric approach
User classes and actors
Use case elicitation workshops
Elements of a use case
Use cases and functional requirements
Sponsored By
6
Three Levels of Software RequirementsBusiness
Requirements
Vision and Scope Document
UserRequirements
User Requirements Document
FunctionalRequirements
Software Requirements Specification
Constraints
BusinessRules
QualityAttributes
External Interfaces
Sponsored By
7
Eliciting Requirements Through Use Cases
Provides a method to capture user requirements.
Focus on actual, but abstracted, usage scenarios.
Ask users:
“Describe a goal you wish to accomplish with the system.”
not:
“What do you want the system to do?”
Explore sequences of actor actions and system responses.
Derive functional requirements and tests from use cases.
Sponsored By
8
What Use Cases Are and Are Not
Definition:
A use case describes a sequence of interactions between a system and an external actor that results in the actor being able to achieve some outcome of value.
Use cases describe:
user goals the user’s view of the system a set of task-related activities
Use cases do not describe:
user interface designs technology solutions application architecture
Sponsored By
9
Examples of Use Cases
Intuit QuickBooks “activities”:
Write a Check Create an Invoice
Enter Credit Card Charge Receive Payment
Amazon.com options for an accepted order:
Check Order Status Change Shipping Options
Cancel Unshipped Items Track Package
Buy a product online:
Search Catalog
Place Item in Shopping Cart
Pay for Items in Shopping Cart
Sponsored By
10
Naming Use Cases
Name properties: reflect the actor’s goal from the actor’s perspective
describe a valuable transaction
be general enough to cover related scenarios
Form: active verb + object “Generate Usage Report,” not “Usage Report Generation”
use strong verbs and specific nouns
Good Examples
Reserve Rental Car Print Invoice Check Flight Status
Not So Good Examples
Enter PIN Submit Form 37 Process Deposit
Hi! My name is:
Sponsored By
11
Agile User Stories
A “short, simple description of a feature told from the perspective of the person who desires the new capability, usually a user or customer of the system.” (Mike Cohn)
serve as placeholder for future conversations for details
augmented with acceptance tests
don’t get into user interaction specifics
A common writing style:
As a <type of user>,
I want <some goal>
so that <some reason>.
Sponsored By
12
Use Cases and User Stories
User
Story
Use
Case
Name
conversations use case
specification
functional
requirements
tests
refined user
stories
conversations acceptance
tests
conversations
analysis
“Create an Invoice”
“As a small business owner, I want to create an invoice so that I can bill a customer.”
Sponsored By
13
Benefits from Usage-Centric Approach
User’s terminology is applied
Reveals requirements for
users to gettasks done
Helps analysts understand
application domain
Helps avoid building unnecessary functionality
Permits early drafting of functional
tests
Helps set implementation
priorities on functional
requirements
Sponsored By
14
Appropriate Use Case Applications
Use cases work well for:
end-user applications
business automation projects
websites
devices with which users must interact
Use cases aren’t as valuable for:
batch processes
event-driven real-time systems
computationally-intensive systems
business analytics systems
Sponsored By
15
User Classes and Actors
User Classes: Distinct communities of users for the product.
Actors: Entities outside the system that interact with it for
the purpose of completing an event.
User Classes Actors
Bank CustomerAccount OwnerLoan Applicant
Depositor
ChemistTechnician
Stockroom StaffLab Manager
ChemicalRequester
Sponsored By
16
Scenarios and Use Cases
A scenario is:
one specific path through a use case, or
a story about a specific instance of a use case execution, perhaps with actual users identified and specific data
Each use case typically includes multiple scenarios.
could be successful or could be failure modes
Sponsored By
17
Use Case Elicitation WorkshopUse Case:
Actor: Requester Frequency: 5/user/day
View an order.
Preconditions: system contains orders;user’s identity is verified
Actor Actions System Responses
user enters ordernumber he wantsto view
user enters ordernumber, but itdoesn’t exist
error message:order numbernot found
display orderdetails
Postconditions: order has been shown
etc. for all normaland exceptionpathways
Sponsored By
18
Products from Use Case Analysis
Use CaseWorkshops
Use CaseDescriptions
Drafted SRS
BusinessRules
VerifiedModels
DataDictionary
Drafted Models
Drafted Tests
VerifiedSRS
SharedVision
Sponsored By
19
Use Case Template
ID and Name:
Created By: Date Created:
Primary Actor: Secondary Actors:
Description:
Trigger:
Preconditions:
Postconditions:
Normal Flow:
Alternative Flows:
Exceptions:
Priority:
Frequency of Use:
Business Rules:
Other Information:
Assumptions:
Sponsored By
20
Sample Use Case for an ATM - 1Name: Withdraw Cash
Actor: Account Owner
Description:
The user withdraws a specific amount of cash from an 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 one 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
Sponsored By
21
Sample Use Case for an ATM - 2
Normal Flow
1. System displays user’s accounts.
2. Account Owner selects desired account.
3. System asks user to choose amount to withdraw from a list.
4. Account Owner chooses amount to withdraw.
5. System dispenses cash.
6. Account Owner removes cash from dispenser.
Sponsored By
22
Sample Use Case for an ATM - 3
Alternative Flows
at step 3, actor can choose to enter a custom amount
describe where the branch takes place, what happens, and
where the alternative flow rejoins the main flow
Exceptions
amount is not a multiple of $20
amount exceeds daily withdrawal limit
amount exceeds account balance
amount exceeds cash available in ATM
indicate the step number where the exception could take
place and how the system handles it
Sponsored By
23
Use Cases and Functional Requirements - 1
Two schools of thought:
Use cases are the functional requirements.
Use cases reveal the functional requirements.
Use Cases
User View
FunctionalRequirements
Developer View
Sponsored By
24
Use Cases and Functional Requirements - 2
Precondition
“The system shall verify that the account is set up for ATM withdrawals.”
Steps in flow
“The system shall display a list of standard withdrawal amounts. The user shall select one of these amounts or ‘Other’.”
Postcondition
“The system shall reduce the total cash remaining in the ATM by the amount of the withdrawal.”
Business rule
“The system shall print the available balance on the receipt, unless the account is a business account.”
Sponsored By
25
Organizing Information: Use Case and SRSUse Case Organization SRS Organization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~
Pre
Rules
Post
Other
E
A
NormalFlow
Sponsored By
26
The Use Case Technique: An Overview
NO
SURPRISES!
27
Sponsor: CEG
Earn a Certificate in Business Analysis Online
Flexible – Available On Demand, 24/7
Free Test Drive of the First Course! http://bit.ly/BAdemo
Great for Enterprise-Wide Deployment
Also available in traditional classroom and virtual programs
Save 20% on training* with promo code: MAWEB14
www.corpedgroup.com• Class Schedules
• Free Weekly Webinars
• Resource Center
Contact: [email protected]
*Applies to open-enrollment courses only. Excludes Business Process Management courses. Special offers may not be combined with any other offers and may not be applied to new registrations preceded by a cancellation for the same class within the previous 30 days. Additional restrictions may apply. Offer expires 3/31/14.
Sponsored By
28
Q & A