CS 499 Use Cases References From Alistair Cockburn
CS 499 Use Cases References From Alistair Cockburn Writing Effective Use Cases (Book) http: //alistair. cockburn. us/ - Use Case Fundamentals (Article) - Structuring Use Cases with Goals (Article) http: //alistair. cockburn. us/
CS 499 What is an Actor? • Basically users of the system • Actually user groups or categories • External entities (people or systems) – That interact with the system – In order to achieve a desired goal http: //alistair. cockburn. us/
CS 499 What is a Use Case? • A description of what happens when users interact with the system • A collection of scenarios about how an Actor uses the system to achieve a particular goal http: //alistair. cockburn. us/
CS 499 Use Cases • • Hold Functional Requirements in an easy to read, easy to track text format Represents the goal of an interaction between an actor and the system. The goal represents a meaningful and measurable objective for the actor. • Records a set of paths (scenarios) that traverse an actor from a trigger event (start of the use case) to the goal (success scenarios) • Records a set of scenarios that traverse an actor from a trigger event toward a goal but fall short of the goal (failure scenarios) • Are multi-level: one use can include/extend the functionality of another Use Cases Do Not… • Specify user interface design. They specify the intent, not the action Detail • Specify implementation detail (unless it is of particular importance to the actor to be assured that the goal is properly met) http: //alistair. cockburn. us/
CS 499 How Are Use Cases Used? • • To Capture the Functional Requirements of the system To act as a springboard for the software design To validate the software design For Software Test and Quality Assurance. (Tests are performed to validate proper and complete implementation of the use cases) • Potentially as an initial framework for the on line help and user manual http: //alistair. cockburn. us/
CS 499 Types of Actors • Primary Actor – The Actor(s) using the system to achieve a goal. – The Use Case documents the interactions between the system and the actors to achieve the goal of the primary actor • Secondary Actor – Actors that the system needs assistance from to achieve the primary actors goal http: //alistair. cockburn. us/
CS 499 Use Case Writing Process • Suggested in Writing Effective Use Cases • Managing Your Energy – Start out at a high level and add detail as you go – Too much detail too fast puts you in a corner, change becomes difficult – It is an iterative, incremental process (use cases, and OO software development) http: //alistair. cockburn. us/
CS 499 Four levels of Use Case “Precision” • Actors and Goals – List all of the Actors and their goals • Use Case Brief (or Main Success Scenario) – Write the trigger and the main success scenario • Failure Conditions – Brainstorm all the failures that could occur. • Failure Handling – Describe how the system should handle each type of failure http: //alistair. cockburn. us/
CS 499 An Example Add Media Copy Actors: Librarian Goal: Add a copy of a media item to the library. Precondition: Media Item exists in library. Librarian 1. Searches for the media item 3. Issues the command to add a new copy. 5. Supplies copy information. Exceptions 1 a – Media item is not found (redirect to Add media item) 3 a, 5 a – Librarian cancels operation. 6 a – 1 – Copy is a duplicate 6 a – 2 - Required information is missing 6 a – 3 – Data does not meet expected format http: //alistair. cockburn. us/ System 2. Displays media item information. 4. Requests copy information (according to media type) 5. Validates the information. 6. Saves the information and informs user.
CS 499 Trouble Getting Started? • Cockburn recommends the use of Usage Narratives as a “warm-up” • A Usage Narrative describes a particular interaction, such as “Joe enters the copy information…” • User Stories are utilized in e. Xtreme Programming are similar to Usage Narratives http: //alistair. cockburn. us/
CS 499 Validating Use Cases • Since Use Cases are used in so many stages of software development, it is important to validate them • Questions to ask: – Is the Use Case complete? Are there any details that need to be added? – Do I feel confident that the actor’s goal is going to be properly met? – Are there any procedural or requirement changes I can suggest that would simplify the process depicted in the Use Case? – Are there any additional Goals of the Actors that are not addressed? – Are there any additional Actors that are not represented (directly or indirectly)? http: //alistair. cockburn. us/
- Slides: 11