56
Use Case Workshop 101 By Andreas Hägglund

How to run a great requirements workshop with Use Cases

Embed Size (px)

Citation preview

Page 1: How to run a great requirements workshop with Use Cases

Use Case Workshop 101

By Andreas Hägglund

Page 2: How to run a great requirements workshop with Use Cases

Primary objectives

• Get the ball rolling

• Have fun

• Get the team to commit

• Scratch the surface

Page 3: How to run a great requirements workshop with Use Cases

Prepare yourself

Read, study and interview

• Feasability studies

• Old backlogs

• Help desk requests

• Bug reports

• Business process models

Page 4: How to run a great requirements workshop with Use Cases

Setting the Scope

What problem are we trying to solve?

What opportunity are we trying to take advantage of?

Page 5: How to run a great requirements workshop with Use Cases

Result – Setting the Scope

Page 6: How to run a great requirements workshop with Use Cases

Identify Actors (given the scope)

• Who will say the system is valuable and useful?

• Who will be interacting with the system? – Who do we need to provide information to the system?

– Who will be receiving information from the system

Who, as in who or what!

Page 7: How to run a great requirements workshop with Use Cases

Identify Actors by using the actor star

Maintenance

Business/Managers

Customers

Staff

Government and laywers

Unknown...

Criminals & Journalists

Uncle Time

Page 8: How to run a great requirements workshop with Use Cases

Actor

Actor

Actor Actor

Result – Identifying Actors

Actor Actor Actor Actor Actor Actor

Actor

Actor

Actor

Actor

Actor Actor Actor Actor Actor Actor Actor Actor

Page 9: How to run a great requirements workshop with Use Cases

Why you always should start with the Actors!

1. Once you’ve identified use cases your mind is trapped! You’ve unintentionally limited your possible actors to the ones related to the use cases you’ve found

2. You won’t forget the use cases you’ve already found

3. It forces you to not think about the solution

Page 10: How to run a great requirements workshop with Use Cases

Identify Use Cases

For every actor:

• What does ”this one” want to do with the system

Page 11: How to run a great requirements workshop with Use Cases

What is a Use Case?

Page 12: How to run a great requirements workshop with Use Cases

Tell your girl-/boyfriend about it!

A use case is so valuable that when you’ve executed it, you want to tell your loved ones about it! Or your boss...

Page 13: How to run a great requirements workshop with Use Cases

A Use Case should be executed by one person, at one point in time

Page 14: How to run a great requirements workshop with Use Cases

An interaction

A use case is an interaction, a

discussion, between the system and

something/-one else

A use case is an interaction, a

discussion, between the system and

something/-one else

Page 15: How to run a great requirements workshop with Use Cases

Something complete

A use case holds all the pieces that’s needed to create value

Page 16: How to run a great requirements workshop with Use Cases

Actor

Actor

Actor Actor

Result 1 – Identifying use cases

Actor Actor Actor Actor Actor Actor

Actor

Actor

Actor

Actor

Actor Actor Actor Actor Actor Actor

Use Case 1

Page 17: How to run a great requirements workshop with Use Cases

Actor

Actor

Actor Actor

Result 2

Actor Actor Actor Actor Actor Actor

Actor

Actor

Actor

Actor

Actor Actor Actor Actor Actor Actor

Use Case 1

Use Case 2

Page 18: How to run a great requirements workshop with Use Cases

Actor

Actor

Actor Actor

Result 3

Actor Actor Actor Actor Actor Actor

Actor

Actor

Actor

Actor

Actor Actor Actor Actor Actor Actor

Use Case 3

Use Case 2

Use Case 1

Page 19: How to run a great requirements workshop with Use Cases

Actor

Actor

Result 4

Actor

Actor Actor Actor Actor Actor Actor Actor Actor

Actor Actor Actor Actor Actor Actor

Actor

Actor

Actor

Page 20: How to run a great requirements workshop with Use Cases

Use the Use Cases to identify more Actors

For every use case:

1. ”Ok, take this use case, that we said was used by Actor X, are there any other actors that also wants to use it?”

2. ”Is there someone that’s needed to provide information to the use case?”

3. ”Is there someone that gets notified about anything by the use case?”

Page 21: How to run a great requirements workshop with Use Cases

Actor

Actor

Result 5

Actor

Actor Actor Actor Actor Actor Actor Actor Actor

Actor Actor Actor Actor Actor Actor Actor Actor

Actor

Actor

Actor

Page 22: How to run a great requirements workshop with Use Cases

Use the new actors to identify more use cases...

For every new Actor:

• ”Ok, how about this Actor, that we said was involved in use case X, does (s)he/it wants to do something else/more with the system?

• ”Is (s)he/it involved in any of the other use cases as well?”

Page 23: How to run a great requirements workshop with Use Cases

Actor

Actor

Final Result

Actor Actor Actor

Actor

Actor Actor Actor Actor Actor

Page 24: How to run a great requirements workshop with Use Cases

Naming the Use Cases

• Use at least Verb + Noun (i.e. ”purchase book” not ”purchase”)

• Use undetermined numbers (i.e ” purchase book” not ”purchase 1 book”)

• Use active tense (” purchase book” not ”purchase of book”)

• Use simple wording (i.e. ”buy book” not ”purchase book”)

• Make the name descriptable (i.e. ”buy book” not ”commit transaction”)

• Show the value (i.e. ”buy book” not ”commit transaction”)

• Initially it’s better with names that are ”too long”, than too short (i.e. ”log on to system, buy books and print receipt” is better than ”log on”)

Page 25: How to run a great requirements workshop with Use Cases

Review the model

• Test the names by reading Actor and Use Case name together – E.g. ”Customer buy book”. It should make sense.

• Do all Use Cases have an Actor?

• Do all Actors have a Use Case?

• Is it overviewable?

• Do we have an agreement?

Page 26: How to run a great requirements workshop with Use Cases

Short Use Case description creates break-trough discussions!

• 1-5 Sentences that helps making it clear to the team what each Use Case contains.

• Expect lots of discussion about the purpose and content of each use case.

• Expect to discover more Actors.

• If you get details, great! But don’t get stuck looking for them...

Page 27: How to run a great requirements workshop with Use Cases

What’s in a short description?

Some or all of:

• The value

• Tell how it start and ends

• Include possible preconditions

• Highlight major crossroads

• Highlight important and/or complex parts

Page 28: How to run a great requirements workshop with Use Cases

Result – Short Descriptions

”The use case lets the Customer find and buy books (s)he likes, select payment methods (credit, invoice, COD) and delivery options. The Use Case ends when the Customer has confirmed the purchase and received an electronic receipt. Purchases of books that are out of stock is put on a waiting list for later delivery.”

Page 29: How to run a great requirements workshop with Use Cases

Get your priorities right!

• Prioritize the actors

• Prioritize what use cases to detail first

• Identify the minimum marketable system

Page 30: How to run a great requirements workshop with Use Cases

Detail the main flow

Do the teenage use case disco dance

Use verbs and nouns

Use active tense

Pay attention to spelling and grammar

Don’t get stuck!

Page 31: How to run a great requirements workshop with Use Cases

Do the following 12 slides fast and you’ll learn the teenage use case disco dance...

System

Page 32: How to run a great requirements workshop with Use Cases

Actor

Page 33: How to run a great requirements workshop with Use Cases

Actor

Page 34: How to run a great requirements workshop with Use Cases

System

Page 35: How to run a great requirements workshop with Use Cases

System

Page 36: How to run a great requirements workshop with Use Cases

Actor

Page 37: How to run a great requirements workshop with Use Cases

Actor

Page 38: How to run a great requirements workshop with Use Cases

System

Page 39: How to run a great requirements workshop with Use Cases

System

Page 40: How to run a great requirements workshop with Use Cases

Actor

Page 41: How to run a great requirements workshop with Use Cases

Actor

Page 42: How to run a great requirements workshop with Use Cases

System

Page 43: How to run a great requirements workshop with Use Cases

System

Page 44: How to run a great requirements workshop with Use Cases

Result – Main Flow

The Use Case starts when the [Book lover] select to search for a book. 1. The [Book lover] enter one or many search criterias (title, author, genre,

character) [Book Found]

2. The System presents information (cover, average review, description, publisher, publishing year, category, genre, synopsis) about the book

3. The [Book lover] selects the book and proceeds to check out. 4. The System asks for payment method and delivery options. 5. The [Book lover] selects invoice and overnight delivery. 6. The System ask [Book lover] to identify him/herself to access billing adress. 7. The [Book lover] identifies him/herself. 8. The System asks the [Book lover] to confirm billing and shipping adress together

with the purchase. 9. The [Book lover] confirms 10. The system generates and stores order details (orderId, purchasing date,

productId, CustomerId, amount) and generates and displays a receipt.

Page 45: How to run a great requirements workshop with Use Cases

What is a ”main flow”

• The most often executed?

• The one most valuable to the business?

• The shortest one?

• The shortest one that still delivers value?

• The most valuable to the user?

• The one first identified?

You decide!

Page 46: How to run a great requirements workshop with Use Cases

Add pre- and postconditions

A Precondition must be true before it’s possible to enter the Use Case.

Two types of Postconditions:

1. Minimum guarantee: This will be true no matter what happens

2. Success guarantee: This will be true if the Use Case ends ”as planned”

Page 47: How to run a great requirements workshop with Use Cases

Result – Pre- and post conditions

Precondition: The identity of the Customer must be known before this Use Case can be triggered

Postcondition

Minimum Guarantee: The transaction is logged and the System is ready for another transaction.

Success Guarantee: The purchase is registered and the Customer has confirmed it.

Page 48: How to run a great requirements workshop with Use Cases

Identify Alternatives For every step in the main flow

• Ask if the Actor can choose to do something else

• Ask if something can go wrong?

• Ask if someone ”else” can send information/interrupt the flow

Page 49: How to run a great requirements workshop with Use Cases

Quality Attributes

For every identified flow:

• Ask how often it will be executed

• Ask how long it may take

• Ask how important it is

• Ask how difficult it is to understand

• Ask how sensitive the information is

Page 50: How to run a great requirements workshop with Use Cases

Result – Alternative Flows

A1 Buy multiple books

A2 Book not in stock

A3 Book not available

A4 Book on sale/campaign – 2 for 1

A5 Buy book from wishlist

A6 Book not for sale

A7 Book discounted

A8 ...

Page 51: How to run a great requirements workshop with Use Cases

Review Model

• Rename use cases to better reflect content of use case

• Add Actors that have been discovered ”within” a Use Case

• Reprioritize

• Structure model if necessary

– Include

– Extend

Page 52: How to run a great requirements workshop with Use Cases

Restructure to improve

Use the 7+/-2 Principle for Restructuring

• 7 +/- 2 Use Cases in the model?

• 7 +/- 2 Alternatives and Error Flows?

• 7 +/- 2 Steps in the main flow?

• 7 +/- 2 Sentences in a step?

Readability Overview Comprehensability Acceptance

Page 53: How to run a great requirements workshop with Use Cases

You made it!

Page 54: How to run a great requirements workshop with Use Cases

Now What?

Page 55: How to run a great requirements workshop with Use Cases

Add details

• Add details to existing flows – Verbs & Nouns

• Add Alternative flows

• Add Quality Attributes

• Break up Use cases that are too big

• Add details

• Add details

• Add details

Page 56: How to run a great requirements workshop with Use Cases

Want to stay updated?

Ahab1972

/andreashagglund

Systemvaruhuset.net (personal site)

Systemvaruhuset.se (corporate site)