Use Cases. Reference: Craig Larman, Applying UML and Patterns, Ch. 6



Similar documents
6 USE CASES. Introduction. Chapter 6. Objectives. The indispensable first step to getting the things you want out of life: decide what you want.

Announcements. SE 1: Software Requirements Specification and Analysis. Review: Use Case Descriptions

Requirement engineering Exercise the POS System solution

Software Requirement Specification

Using Use Cases for requirements capture. Pete McBreen McBreen.Consulting

Using Use Cases on Agile Projects

Use Case Modeling. Software Development Life Cycle Training. Use Case Modeling. Set A: Requirements Analysis Part 3: Use Case Modeling

Use Cases. Massimo Felici. Massimo Felici Use Cases c

Use Cases and Scenarios

Advanced Software Test Design Techniques Use Cases

Use-Case Analysis. ! What is it? ! From where did it come? ! Now part of UML

4.4 What is a Requirement? 4.5 Types of Requirements. Functional Requirements

Use Case Diagrams. Tutorial

User experience storyboards: Building better UIs with RUP, UML, and use cases

Software Requirements Specification of A University Class Scheduler

Large Scale Systems Design G52LSS

Scenario-based Requirements Engineering and User-Interface Design

DOCUMENTING USE CASES

Requirements engineering

Tips for writing good use cases.

Course Registration Case Study

Specification of the UFT Web-Based Fitness Tracking Software

Course Outline. Foundation of Business Analysis Course BA30: 4 days Instructor Led

Requirements / Use Case Specification

How to Make a Domain Model. Tutorial

Writing Use Case Scenarios for Model Driven Development

Software Development Process

An Approach to Software Architecture Description Using UML

Object-oriented design methodologies

How To Create A Diagram On Rational Software Development Platform

Masters of Science in Software & Information Systems

Principles of Software Construction: Objects, Design, and Concurrency. Domain Modeling and Specifying System Behavior. toad

Click DVDs. Just click to pick. CS4125 Systems Analysis and Design Chantelle Geoghegan Danielle Frawley

Microsoft Dynamics GP Release. Workflow Administrator s Guide

Contents. Introduction and System Engineering 1. Introduction 2. Software Process and Methodology 16. System Engineering 53

Budget Planner SOFTWARE REQUIREMENT SPECIFICATION. Professor: Dr. Doan Nguyen. Team Members: Bindu Madhavi K Khambam Suganya Srinivasan

Use Cases and Scenarios! We Will Cover!

Object-Oriented Design Guidelines

4. Multiagent Sys stems Design. Part 2: The PROMETHEUS methodology.

Object-Oriented Systems Analysis and Design

OO Analysis and Design with UML and USDP. Solutions. Created by Dr. Jim Arlow. Version 2.0

Microsoft Dynamics GP 2010

Invoice Only PROFILE DESCRIPTION

Communication Diagrams

Evaluation of a Use-Case-Driven Requirements Analysis Tool Employing Web UI Prototype Generation

The role of integrated requirements management in software delivery.

Case Study Solutions. This appendix contains the solutions to the Acme Mining Company Case Study.

Case studies: Outline. Requirement Engineering. Case Study: Automated Banking System. UML and Case Studies ITNP090 - Object Oriented Software Design

Basic Unified Process: A Process for Small and Agile Projects

Designing Real-Time and Embedded Systems with the COMET/UML method

What CMMI Cannot Give You: Good Software

CPS122 - OBJECT-ORIENTED SOFTWARE DEVELOPMENT. Team Project

Requirements Engineering for Web Applications

Intranet Website Solution Based on Microsoft SharePoint Server Foundation 2010

UML TUTORIALS THE USE CASE MODEL

From Business Process Models to Use Case Models

FPT UNIVERSITY. Capstone Project

Software Specification and Architecture 2IW80

In this Lecture you will Learn: Systems Development Methodologies. Why Methodology? Why Methodology?

<Project Name> Quality Assurance Plan

TDDC88 Lab 2 Unified Modeling Language (UML)

New York University Computer Science Department Courant Institute of Mathematical Sciences

UML Activity Diagrams: Versatile Roadmaps for Understanding System Behavior

The Rap on RUP : An Introduction to the Rational Unified Process

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Mobile Money Manager

Requirements engineering and quality attributes

(BA122) Software Engineer s Workshop (SEW)

Modeling a Problem Scenario with UML

Domain Modeling. Domain Modeling

<Company Name> <Project Name> Software Development Plan. Version <1.0>

Microsoft Word 2011: Create a Table of Contents

VALLIAMMAI ENGINEERING COLLEGE S.R.M. Nagar, Kattankulathur DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Supply Chain Management Use Case Model

Software Requirements, Third Edition

Sofware Requirements Engineeing

Software Requirements Specification for POS_Connect Page 1. Software Requirements Specification. for. POS_Connect. Version 1.0

NetSuite SuiteFoundation Study Guide: July 2016

Requirements Management

UML for e-commerce. Doug Rosenberg ICONIX Software Engineering, Inc. iconixsw.com.

The Tropos and MaSE Agent-Oriented Software Engineering Methodologies. Msury Mahunnah, Tallinn University of Technology

The Role of Use Cases in Requirements and Analysis Modeling

A Comparison of Service-oriented, Resource-oriented, and Object-oriented Architecture Styles

What is a life cycle model?

Use Case-based Requirements

COSC 3351 Software Design. Recap for the first quiz. Edgar Gabriel. Spring For the 1 st Quiz

Functional Requirements Document -Use Cases-

Software Requirements. Specification. Day Health Manager. for. Version 1.1. Prepared by 4yourhealth 2/10/2015

Phases, Activities, and Work Products. Object-Oriented Software Development. Project Management. Requirements Gathering

Development Methodologies. Types of Methodologies. Example Methodologies. Dr. James A. Bednar. Dr. David Robertson

From Business Event to BUC

Transcription:

Use Cases Reference: Craig Larman, Applying UML and Patterns, Ch. 6

Use Case What it is: Text story Widely used to discover and record (mostly functional) requirements What is it about: Some actor(s) using a system to meet specific goals Answering questions: Who is using the system, what are their typical scenarios of use, and what are their goals? What it is NOT: Not object-oriented Not a diagram UML use cases diagrams are secondary-value artifacts Focus: use cases, not use case diagrams

Example: Point of Sale 1.Customer arrives at a checkout (+goods). 2.Cashier uses POS system to record items. 3.System presents a running total and lineitem details. 4.Customer enters payment information, which the system validates and records. 5.System updates inventory. 6.Customer receives receipt from the system and leaves.

Actors, Scenarios, and Use Cases Actor: entity that shows a behavior, e.g.: a person (role), computer system, or organization Scenario: specific sequence of actions and interactions between actors and a system use case instance singe path of using the system e.g., purchasing 10 items with cash (or even more detailed) Use case: collection of related success & failure scenarios that describe an actor using a system to support a goal

Use Case Example with Scenarios (casual format) UC Handle Returns Main success Scenario: A customer arrives at a checkout with items to return. The cashier uses the POS system to record each returned item Alternate Scenarios: if the customer paid by credit... If the item identifier is not found in the system If the system detects failure to communicate with the external accounting system

Use-Case Model Set of all written use cases Model of the system s functionality and environment Unified Process (UP) defined artifact within the requirements discipline UP also requires glossary. May optionally include a UML use case diagram use cases, actors, and their relationships context diagram

Three Kinds of Actors Primary actor has user goals fulfilled through using services of the system under discussion drives the use cases Supporting actor provides a service to the system under discussion e.g., payment authorization service implies: clarification of external interfaces and protocols needed Offstage actor has an interest in the behavior of the use case, but is not primary or supporting e.g., a government tax agency

Use Case Format Brief Succinct one-paragraph summary usually the main success scenario done during early requirements analysis should take only a couple of minutes Casual informal paragraph format multiple paragraphs covering various scenarios Fully dressed details all steps and variations includes supporting sections such as preconditions and success guarantees mainly done after many use cases are identified and during early requirements workshop for high-value and high-risk requirements (e.g., core architectural)

A Template for Fully Dressed Style Use case name start with a verb Scope the system under design Level user goal or subfunction level Primary actor calls on the system to deliver a service Stakeholders and interests who cares about this use case, and what do they want? Preconditions what must be true on start, and worth telling the reader Success guarantee (postcondition) what must be true on successful completion, and worth telling the reader Main success scenario a typical, unconditional happy path scenario of success Extensions alternate scenarios of success and failure Special requirements related non-functional requirements Technology and data variations list varying I/O methods and date formats Frequency of occurrence Miscellaneous

Coffee Maker Example Example of a semi fully dressed use case CoffeeMaker http://agile.csc.ncsu.edu/sematerials/tutorials/coffee_maker/

Template for a fully dressed use case

Write in an Essential Style (early phase) Keep the user interface out Focus on actor intent User s intentions and system s responsibilities rather than their concrete actions Example Manage Users: 1. Administrator identifies self. 2. System authenticates identity. Another is concrete style that embeds user interface decisions - avoid during early analysis Example 1. Administrator enters ID and Password in a dialog box

Write Black-Box Use Cases Focus on what the system must do, i.e., the behavior or functional requirements Not on how it will do (the design) Examples: Good: The system records the sale Bad: The system writes the sale to the database. Worse: System generates SQL INSERT statement for the sale

Take an Actor and Actor-Goal Perspective Use case definition by Jacobson A set of use-case instances, where each instance is a sequence of actions a system performs that yields an observable result of value to a particular actor [Jacobson] Write requirements focusing on the users/actors of a system, asking about their goals and typical situations and what they consider a valuable result

Actor-Goal List

One Column vs Two Column Format Two column emphasizes interaction

How to Find Use Cases? Choose the system boundary what you are building? who will be using the system? what else will be used that you are not building? Find primary actors and their goals brainstorm the primary actors first who starts and stops the system? who gets notified when there are errors or failures? Define use cases that satisfy user goals prepare an actor-goal list (and not actor-task list) in general, one use case for each user goal name the use case similar to the user goal

What Tests Can Help Find Useful Use Cases? Which of these are valid use cases? Negotiate a Supplier Contract Handle Returns Log in Move Piece on the Game Board

What Tests Can Help Find Useful Use Cases? Which of these are valid use cases? Negotiate a Supplier Contract Handle Returns Log in Move Piece on the Game Board All of these can be use cases at different levels, depending on the system, boundary, actors, and goals

What Tests Can Help Find Useful Use Cases? Rather than asking What is a valid use case? More practical question: What is a useful level of focus to express use cases for application requirements analysis? Rules of thumb The Boss Test The EBP Test The size test

What Tests Can Help Find Useful Use Cases? The boss test What have you been doing all day? Your reply logging in! Is your boss happy? No value? No good use case! The Elementary Business Process (EBP) test 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 data in a consistent state Good Examples: Approve Credit or Price Order Bad Examples: delete a line item or print the document The size test Just a single step in a sequence of others -> not good!

Applying Tests Negotiate a supplier contract Much broader than EBP, rather a business use case Handle returns OK with the Boss. EBP. Size is good. Log in Boss is not happy is this is all you do all day! Move piece on game board Single step fails the size test.

Use Case (Context) Diagrams: Suggested Notation

Use Case Diagrams Context diagram of the system Shows boundary What lies outside of it How it gets used Should be done in conjunction with an actor-goal list Downplay diagramming, Keep it short and simple Focus on text Do not focus on use case relationships

Alternative Actor Notation

Use Cases form Basis for Others

Use Cases in Iterative Development Functional requirements are primarily captured in use cases Use cases drive the iteration planning and work Easy for users to understand Influence user manual/documentation Functional or system testing corresponds to the scenarios of use cases Independent of implementing technology UI shortcuts for most common scenarios

More examples? itrust http://agile.csc.ncsu.edu/itrust/wiki/ doku.php

Questions/Comments/Thoughts?

Credits Contents adopted from Applying UML and Patterns - Larman and www.craiglarman.com