Capturing and Exploring Requirements with Use Cases and

Download Report

Transcript Capturing and Exploring Requirements with Use Cases and

Capturing Requirements
with Use Cases
Use Case—Definition
• A use case is a narrative description of a
goal-oriented interaction between the system
under development and an external agent
• Includes the what:
– User (Actor in Use Case Parlance)
– Goal
– Interaction
• But not the how:
– Excludes User Interface Detail
– Excludes Implementation Concerns
Simple Example
Benefits of capturing requirements
with use cases
• Excellent ROI
• Simple and intuitive method of recording
functional requirements.
• Readable by end users but also detailed enough for
programmers to implement and testers to write test
cases.
• Systematic and semi-formal representation helps
ensure requirements are complete and well
understood.
Other Advantages
• Expressing requirements in term of goaloriented user interaction avoids gold plating
or adding features that aren’t likely to be
used.
• Can be used to drive the development
process. (Iteration planning, validate
architecture,
Aspects of a use case
Another Example
UML Use Case Diagrams
Newspaper Web Site
Post article
<<include>>
Journalist
System Under
Development
Authenticate user
<<include>>
Actor
Use Case
Generic Form
Find and
read article
Example
Reader
Use Case Template
Title:
Actors:
Preconditions:
Postconditions:
Basic Flow / Main Success Scenario
Alternate Flow / Extensions
Open Issues
Example
Title:
Search Web with suggested key words
Actors:
Web User
Preconditions:
Web user is at the search page
(Google Suggest)
Basic Flow
1.
User begins to enter search phrase
2.
As characters of search phrase are typed, the system responds with suggested search phrases that start
with characters entered
3.
The system enters the highest ranking suggested search phrase into the search box where the user is
typing
4.
User scrolls to desired suggested phrase
5.
User initiates search
6.
System responds with search results that match search phrase
Alternate Flows
2a. There are no high ranking suggested search phrases for the characters the user has entered
1. The system gives no suggested search phrases
2. The user enters the remaining characters in the search phrase and control returns to step 5 in basic flow
4a. User decides to accept suggested search phrase in search box
1. User initiates search with suggested search phrase currently in search box
4b. User finishes entering original search phrase but doesn’t want to take system’s suggestion
1. User hits backspace to erase remaining suggested characters in search box
Open Issues
1. How to decide the order or ranking of suggested search phrases.
A Process for Writing Use Cases
1. Identify actors
2. Identify the goals associated with each
actor. Make each goal a use case.
3. Prioritize use cases
4. Elaborate use cases
5. Create a structured use case model (UML
Diagram)
References