IntellAgile www.craiglarman.com Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.

Slides:



Advertisements
Similar presentations
Requirements Diagrams With UML Models
Advertisements

Object-Oriented Analysis and Design Evolutionary Requirements.
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Actors and use cases Use-case diagram Brief notation Prioritization Fully dressed notation Requirements Functional requirements  Use-cases.
Writing Use Cases: Requirements in Context
Use cases.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
Jan Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box Actors.
COMP 350: Object Oriented Analysis and Design Lecture 3 Case Studies, Inception & Use Cases References: Craig Larman Chapters 3-6.
Systems Analysis and Design in a Changing World, Fourth Edition
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” - may be of.
Fall 2009ACS-3913 Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
Chapter 10 System Sequence Diagrams. What is a System Sequence Diagram? A way of modeling input and output events related to systems It is a picture that.
Use Cases & Requirements Analysis By: Mostafa Elbarbary.
Understanding Requirements
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Copyright ©2004 Cezary Z Janikow 1 Use Cases n Within Requirements discipline/workflow n Verbal descriptions of important functional (behavioral, transactional,
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
This section has been adapted from Dr. Scott Fleming of U. Memphis Details about Use Cases.
The first step in getting what you want is to decide what you want.
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative Development Part III Elaboration Iteration I – Basic1.
Object-Oriented Analysis and Design
Software Engineering 1 Object-oriented Analysis and Design Chap 30 Relating Use Cases.
Object-Oriented Analysis - Instructor Notes
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Visualizing Concepts with a Domain Model.
Requirements Functional requirements  Use-cases
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
ZEIT2301 Design of Information Systems Functional Design: Use Cases School of Engineering and Information Technology Dr Kathryn Merrick.
4 2009/10 Object Oriented Technology 1 Topic 4: The Object-Oriented Approach to Requirements Adopted from: Ch.7 The Object-Oriented Approach to Requirements.
10/12/ Recall The Team Skills 1. Analyzing the Problem (with 5 steps) 2. Understanding User and Stakeholder Needs 1. Interviews & questionnaires.
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
Chapter 6 Use Case –The interaction between an actor and the system.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 20. Review Software Requirements Requirements Engineering Process.
Object-Oriented Analysis and Design Jan 14, 2009.
 Development is organized in a series of short, fixed-length mini-projects called iterations  Iterations are also incremental  Successive enlargement.
OOSE Use Case. Requirement Functional: –Features, capabilities, and security Non Functional: –Usability: Human factors, help, and documentation –Reliability:
Originated by K.Ingram, J.Westlake.Edited by N.A.Shulver Use Case Scripts What is a Use Case Script? The text to describe a particular Use Case interaction.
Chapter 9 Applying UML and Patterns -Craig Larman
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Drawing System Sequence Diagrams
OO Methodology Inception Phase.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
Business Analysis with For PG MDI, Gurgaon Kamna Malik, Ph.D.
System Sequence Diagram Chandan Rupakheti & Steve Chenoweth Week 5-3a.
Systems Analysis and Design in a Changing World, Fourth Edition
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
PRESENTATION ON USE CASE. Use Case Modeling Use case diagrams describe what a system does from the standpoint of an external observer. The emphasis is.
Chapter 6: Use Cases.
Understanding Requirements
Copyright © Craig Larman All Rights Reserved Use Cases.
Larman chapter 61 Use cases Larman chapter 6. 2 Fig. 6.1.
SYSTEM-LEVEL SEQUENCE DIAGRAMS Sys466. System-Level Sequence Diagrams  Use cases describe how external actors interact with the software system…  An.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
1 Object Oriented Analysis and Design System Events & Contracts.
Jan Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
CMPE 280 Web UI Design and Development August 29 Class Meeting
Systems Analysis and Design in a Changing World, 6th Edition
System Sequence Diagrams and Operation Contracts
Creating Use Cases.
UML Use Case Diagrams.
Writing Use Cases.
Start at 17th March 2012 end at 31th March 2012
Systems Analysis and Design in a Changing World, 6th Edition
Use Case Modeling.
Software Requirements
Use cases Dr. X.
Presentation transcript:

IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context

IntellAgile 2 Overview  Use cases are one way to capture (especially) functional requirements.  They are stories of using a system.  You will be able to:  Identify different use case levels  Write use cases in the popular Cockburn format  Contrast essential and concrete use cases  Apply guidelines  Read and write use case diagrams iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 3 Trends  Alistair Cockburn’s approach is popular  Applying… follows this style iterative requirements use cases sys. sequence diagrams domain models Use case chapters were written with Cockburn

IntellAgile 4 DEFINITION: Use Case  Informally, a use case is a story of using a system to fulfill a goal.  Rent Videos  Used by primary actors  E.g., Clerk  External agents  something with behavior  Use supporting actors.  CreditAuthorizationSystem iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 5 EXAMPLE: Use Case. DEFINITION: Brief  Here’s one in a brief format:  Rent Videos. A Customer arrives with videos to rent. The Clerk enters their ID, and each video ID. The System outputs information on each. The Clerk requests the rental report. The System outputs it, which is given to the Customer with their videos. iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 6 DEFINITION: Scenario  Informally, a scenario is a specific sequence of actions and interactions in a use case.  One path through the use case.  E.g., The scenario of renting videos and first having to pay overdue fines.  More formally, a use case is a collection of success and failure scenarios describing a primary actor using a system to support a goal. iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 7 Use Cases  There is nothing object-oriented about use cases.  So, why bother in an OOA/D workshop?  We need some kind of requirements input for the design steps.  They are common/popular.  There is a UML-related topic. –Use case diagrams iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 8 Levels of Use Cases  A common challenge is identifying use cases at a useful goal level.  For example, how do we know which of these is at a useful level?  Negotiate a Supplier Contract  Rent Videos  Log In  Start Up iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 9 Levels of Use Cases  One answer is that they are all use cases.  Not helpful…  We can end up with too many fine-grain use cases –management and complexity problems.  Or “fat” use cases which span an entire organization. iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 10 GUIDELINES: EBP for Use Case Levels  Cockburn supports the Elementary Business Process (EBP) guideline.  Focus on use cases at the level of EBPs.  “A task performed by one person in one place at one time, in response to a business event, which adds measurable business value and leaves the data in a consistent state.” iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 11 GUIDELINES: EBP for Use Case Levels  Naively, can you apply the “boss test” for an EBP?  Boss: “What do you do all day?”  Me: “I logged in!”  Is Boss happy? iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 12 GUIDELINES: Size for Use Case Levels  An EBP-level use case usually is composed of several steps, not just one or two.  It isn’t a single step. iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 13 Use Case Levels: Applying the Guidelines  Applying the EBP and size guidelines:  Negotiate a Supplier Contract  Rent Videos  Log In  Start Up  The others can also be modeled as use cases.  But, prefer a focus on the EBP level. iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 14 Use Case Diagrams  The UML has use case diagrams.  Use cases are text, not diagrams.  Use case analysis is a writing effort, not drawing.  But a short time drawing a use case diagram provides a context for:  identifying use cases by name  creating a “context diagram” iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 15 Use Case Diagrams iterative requirements use cases sys. sequence diagrams domain models Warning: Don’t spend much time on diagramming. Use case work means to write text, not draw diagrams

IntellAgile 16 GUIDELINES: Use Case Diagrams iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 17 GUIDELINES: Use Case Modeling  It is common to group CRUD operations into one use case.  Manage Users  Name starts with a verb.  Manage Users  All systems have a Start Up and Shut Down use case (perhaps trivial and low level).  But sometimes, important. –an avionics system iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 18 GUIDELINES: Use Case Modeling  Prefer EBP-level use cases.  AKA user-level goal use cases.  Common quality assurance checks. Are these present:  Use Cases: –Some variant of Configure System –Sometimes, Start Up and Shut Down  Actors: –System Administrator iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 19 DEFINITION: Fully Dressed Use Cases  Rich notation for detailed analysis.  Shows branching scenarios.  Can include non-functional requirements related to the functional. iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 20 EXAMPLE: Fully Dressed Use Case UC1: Rent Video Level: User-level goal (EBP level) Primary Actor: Clerk Preconditions:  Clerk is identified and authenticated. Stakeholders and their Interests: Clerk: Wants accurate, fast entry. Customer: Wants videos, and fast service with minimal effort. Accountant: Wants to accurately record transactions. Marketing: Wants to track customer habits.... iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 21 EXAMPLE: Fully Dressed Main Success Scenario (or Basic Flow or “Happy Path”): 1. Customer arrives at a checkout with videos or games to rent. 2. Clerk enters Customer ID. 3. Clerk enters rental identifier. 4. System records rental line item and presents item description. (Clerk repeats steps 3-4 until indicates done.) 5. System displays total. 6. Customer pays. System handles payment. 7. Clerk requests rental report. 8. System outputs it. Clerk gives it to Customer. 9. Customer leaves with rentals and report. iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 22 EXAMPLE: Fully Dressed Extensions (or Alternatives): a*. At any time, System fails: 1. Clerk restarts System 2. logs in 3. requests recovery from prior state 1a. New Customer. 1. Perform use case Manage Membership. 1. Perform use case Manage Membership. 2a. Customer ID not found. 1. Cashier verifies ID. If entry error, reenter, else Manage Membership. 1. Cashier verifies ID. If entry error, reenter, else Manage Membership. 2b. Customer has unpaid fines (usually for late returns). 1. Pay Fines. 1. Pay Fines. iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 23 EXAMPLE: Fully Dressed Special Requirements: n Language internationalization on the display messages and rental report. n Large text on display. Visible from 1 m. Technology and Data Variations: n ID entries by bar code scanner or keyboard. Frequency: n Near continuous Open Issues: Should we support a magnetic stripe cards for customer ID, and allow customer to directly use card reader? Should we support a magnetic stripe cards for customer ID, and allow customer to directly use card reader? iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 24 DEFINITION: Essential & Concrete Use Cases  “Keep the UI out”  Essential use cases defer the details of the UI, and focus on the intentions of the actors.  Essential: Clerk enters Customer ID.  Concrete/worse: Clerk takes Customer ID card and reads the bar code with laser scanner. iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 25 GUIDELINES: Use Case Writing  Start sentence 1 with “ does ”  Customer arrives with videos to rent.  First write in the essential form, and “Keep the UI out.”  Capitalize “actor” names.  …  Clerk enters…  System outputs… iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 26 GUIDELINES: Use Case Writing  Terse is good. People don’t like reading requirements ;). Avoid noisy words.  More verbose  …  The Clerk enters…  The System outputs…  Less  …  Clerk enters…  System outputs… iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 27 Concrete Use Cases  Sometime after the essential form of the use case has been written, one may optionally write it in a concrete form. 1. Customer arrives at a checkout with videos or games to rent. 2. Clerk scans Customer ID… Extensions 2a. Scanner failed. 1. Clerk enters ID on keyboard (see GUI window example, fig 5)…

IntellAgile 28 Artifacts in the UP Use-Case Model iterative requirements use cases sys. sequence diagrams domain models

IntellAgile 29 Recommended Resources iterative requirements use cases sys. sequence diagrams domain models