20
Vakgroep Informatietechnologie – IBCN Software Engineering Prof.Dr.ir. F. Gielen Functional Requirements Use cases & System Scenarios

Ws002 use cases

Embed Size (px)

DESCRIPTION

Workshop on use case development

Citation preview

Page 1: Ws002 use cases

Vakgroep Informatietechnologie – IBCN

Software EngineeringProf.Dr.ir. F. Gielen

Functional Requirements Use cases & System Scenarios

Page 2: Ws002 use cases

Use Cases & Scenarios

Use cases, sometimes called user scenarios, are narratives or flow diagrams that describe how users will interact with a system.

Some people also refer to them as task analysis or user flows. Regardless of what you call them, the idea is the same:

Illustrate to people scenarios or specific tasks which users will perform on the system.

Illustrate how the system interacts with other systems.

p. 2 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN

Page 3: Ws002 use cases

Use Case Diagram

Use case diagrams are created to visualize the relationships between actors and use cases

Use cases are a visualization of the functional requirements of a system

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 3

Page 4: Ws002 use cases

Example : Use Case Diagram

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 4

Page 5: Ws002 use cases

Actors & user profiles (persona’s)

An actor is someone or something that must interact with the system under development

Before starting any project it is imperative to understand the target audiences. User profiles (also referred to as user personas) are an excellent way to document and illustrate realistic sample users.

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 5

Page 6: Ws002 use cases

Use Cases

A use case is a pattern of behavior the system exhibits

Each use case is a sequence of related transactions performed by an actor and the system in a dialogue

Actors are examined to determine their needs

Passenger – Search for Flights, Make Reservation, Pay for Flight

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 6

Page 7: Ws002 use cases

Documenting Use Cases

A use case specification document is created for each use case

Written from an actor point of view

Details what the system must provide to the actor when the use case is executed

Typical contents How the use case starts and ends Normal flow of events Alternate flow of events Exceptional flow of events

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 7

Page 8: Ws002 use cases

Template for Use Cases

Textual description in prose Priority|Complexity (High, Medium or Low) Related informal requirements Actors Events (triggering, during execution, ...) Preconditions Main success scenario (MSS - Diagram) Extensions on the MSS Postconditions after success and failure Related use cases

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 8

Page 9: Ws002 use cases

System Sequence diagram

Black Box Sequence Diagram

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 9

Page 10: Ws002 use cases

Write an effective Use Case : eBay

STEP 1. Define your use case actors

-> An actor can be a person or a system

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 10

Page 11: Ws002 use cases

Write an effective Use Case: eBay

STEP 2. Define your use case Actor Goals & Needs

-> What are the goals & needs of each actor

-> Create initial list of high level use cases

-> Effective use cases should have understandable actors and goals

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 11

Page 12: Ws002 use cases

Write an effective Use Case: eBay

STEP 3. Identify reuse opportunity for use cases

-> Identify the duplicated behavior

-> Create a generic actor or a generic use case

-> This will make the system more understandable and flexible

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 12

Page 13: Ws002 use cases

Write an effective Use Case: eBay

STEP 4. Create a use case index

-> Every use case has attributes to himself and to the project

-> Project level:

- Technical complexity: High Medium or Low

- Business priority

-> Make a selection of scenarios for elaboration (in scope) based on the combined weight of complexity & priority.

-> It will serve as a master inventory to help write effective use cases

for the requirements phase of the project

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 13

Page 14: Ws002 use cases

Write an effective Use Case: eBay

STEP 5. Identify the key components of your use case

->The actual use case is a textual & graphical representation illustrating a sequence of events. There are several components of a use case which we will review

-> In this table, you get a basic understanding of what is in the use

case and review each element as you progress through your use

casesUse Case Element DescriptionUse Case Number ID to represent your use caseUse Case Name The name of your use case, keep it short and sweet

Use Case Description Elaborate more on the name, in paragraph form.

Primary Actor Who is the main actor that this use case represents

Precondition What preconditions must be met before this use case can start

Trigger What event triggers this use case

Basic Flow

The basic flow should be the events of the use case when everything is perfect; there are no errors, no exceptions. This is the "happy day scenario". The exceptions will be handled in the "Alternate Flows" section.

Alternate Flows The most significant alternatives and exceptions

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 14

Page 15: Ws002 use cases

Write an effective Use Case: eBay

STEP 6. Name and briefly describe your use case

->start creating your use case

->use plain English and keep it simple!

Use Case Number: 1

Use Case Name: Buyer Places a Bid

Description:An EBAY buyer has identified an item they wish to buy, so they will place a bid for an item with the intent of winning the auction and paying for the item.

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 15

Page 16: Ws002 use cases

Write an effective Use Case

STEP 7. Create the use case basic flow

->this represents the most important course of events

-> No errors or exceptions

use UML Sequence diagrams

SYSTEM LEVEL &

BLACK BOX

STEP 8. Create the use case alternate flow

->An exception or error flow to any line item in your basic flow

-> An additional flow, a flow that COULD happen

(example: While a costumer places an order, their credit card failed)

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 16

Page 17: Ws002 use cases

Write an effective Use Case

STEP 9. Consolidate and create the use case diagram

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 17

Page 18: Ws002 use cases

Scenario document – use case part

Use case diagram: UML Use case index: TEXT Use case description for the top 3 scenario

’s: TEXT + UML sunny day rainy day

p. 18 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN

Page 19: Ws002 use cases

Visio: Use Cases – Modeling tool

For modeling the Use Cases, we use the program “Visio”

Athena: -> Office -> Extra -> Visio 2010

If you want the right “Shapes”:Download the stencil from www.softwarestencils.com/uml

Open stencil in Visio

Use the right shapes

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 19

Page 20: Ws002 use cases

Agile Resources

UML & Agile: www.agilemodeling.com/essays/umlDiagrams.htm

Use Cases www.agilemodeling.com/artifacts/useCaseDiagram.htm Use case template: Minerva

Sequence Diagrams: www.agilemodeling.com/artifacts/sequenceDiagram.htm

p. 20 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN