Agile Analysis with Use Cases: Balancing Utility with Simplicity

Post on 05-Dec-2014

2.353 views 0 download

description

A mainstay of conventional requirements gathering, use cases can ease the transition to agile methodologies. In this practical program, we explore: * how to write uses cases * how to adapt uses cases to agile projects * how to automate acceptance testing with use cases Ted Husted is a Rochester NY Business Analyst and member of the IIBA. In 2008, he joined NimbleUser, a .NET integrator specializing in non-profits and associations. Ted is co-author of JUnit in Action and a regular speaker at the Ajax Experience, ApacheCon, and various user groups.

Transcript of Agile Analysis with Use Cases: Balancing Utility with Simplicity

Agile Analysis with Use CasesBalancing Simplicity with Utility

Presented by Ted HustedNimbleUsertwitter.com/TedHusted

How is Pong like a Use Case?

How do we play use case?1. System sends puck toward player.2. Player moves paddle to meet puck.3. Puck misses paddle.4. System increments score for other player.5. System resets acceleration factor.6. Round repeats for other player.

How do we play use case?1. System sends puck toward player.2. Player moves paddle to meet puck.3. Puck misses paddle.4. System increments score for other player.5. System resets acceleration factor.6. Round repeats for other player.

How do we play use case?1. System sends puck toward player.2. Player moves paddle to meet puck.3. Puck misses paddle.4. System increments score for other player.5. System resets acceleration factor.6. Round repeats for other player.

How do we play use case?1. System sends puck toward player.2. Player moves paddle to meet puck.3. Puck misses paddle.4. System increments score for other player.5. System resets acceleration factor.6. Round repeats for other player.

How do we play use case?1. System sends puck toward player.2. Player moves paddle to meet puck.3. Puck misses paddle.4. System increments score for other player.5. System resets acceleration factor.6. Round repeats for other player.

How do we play use case?1. System sends puck toward player.2. Player moves paddle to meet puck.3. Puck misses paddle.4. System increments score for other player.5. System resets acceleration factor.6. Round repeats for other player.

How do we play use case?1. System sends puck toward player.2. Player moves paddle to meet puck.3. Puck misses paddle.4. System increments score for other player.5. System resets acceleration factor.6. Round repeats for other player.

Is that all there is?2a Puck trajectory is too steep2b Puck angles for a corner shot3a Player returns puck3b Puck intersects center segment3c Puck intersects outer segment5a Player wins

Is that all there is?2a Puck trajectory is too steep2b Puck angles for a corner shot3a Player returns puck3b Puck intersects center segment3c Puck intersects outer segment5a Player wins

Is that all there is?2a Puck trajectory is too steep2b Puck angles for a corner shot3a Player returns puck3b Puck intersects center segment3c Puck intersects outer segment5a Player wins

Is that all there is?2a Puck trajectory is too steep2b Puck angles for a corner shot3a Player returns puck3b Puck intersects center segment3c Puck intersects outer segment5a Player wins

Is that all there is?2a Puck trajectory is too steep2b Puck angles for a corner shot3a Player returns puck3b Puck intersects center segment3c Puck intersects outer segment5a Player wins

Is that all there is?2a Puck trajectory is too steep2b Puck angles for a corner shot3a Player returns puck3b Puck intersects center segment3c Puck intersects outer segment5a Player wins

How do we win?2a Puck trajectory is too steep2b Puck angles for a corner shot3a Player returns puck3b Puck intersects center segment3c Puck intersects outer segment5a Player wins

How do we win?2a Puck trajectory is too steep2b Puck angles for a corner shot3a Player returns puck3b Puck intersects center segment3c Puck intersects outer segment5a Player wins1. Score exceeds the maximum number of points. 2. System presents game over banner.3. End.

What about diagrams?

How is a user story different?

What’s wrong with this story?Pong is a two-dimensional sports game which simulates table tennis. The player controls an in-game paddle by moving it vertically across the left side of the screen, and can compete against either a computer controlled opponent or another player controlling a second paddle on the opposing side. Players use the paddles to hit a ball back and forth. The aim is for a player to earn more points than the opponent; points are earned when one fails to return the ball to the other.

What’s wrong with this story?Pong is a two-dimensional sports game which simulates table tennis. The player controls an in-game paddle by moving it vertically across the left side of the screen, and can compete against either a computer controlled opponent or another player controlling a second paddle on the opposing side. Players use the paddles to hit a ball back and forth. The aim is for a player to earn more points than the opponent; points are earned when one fails to return the ball to the other.

What’s wrong with this story?Pong is a two-dimensional sports game which simulates table tennis. The player controls an in-game paddle by moving it vertically across the left side of the screen, and can compete against either a computer controlled opponent or another player controlling a second paddle on the opposing side. Players use the paddles to hit a ball back and forth. The aim is for a player to earn more points than the opponent; points are earned when one fails to return the ball to the other.

What’s wrong with this story?Pong is a two-dimensional sports game which simulates table tennis. The player controls an in-game paddle by moving it vertically across the left side of the screen, and can compete against either a computer controlled opponent or another player controlling a second paddle on the opposing side. Players use the paddles to hit a ball back and forth. The aim is for a player to earn more points than the opponent; points are earned when one fails to return the ball to the other.

What can go wrong with this story?

Agile Analysis with Use CasesA mainstay of conventional requirements gathering, use cases can ease the transition to agile methodologies. In this practical program, we explore:

how to write uses caseshow to adapt uses cases to agile projectshow to automate acceptance testing with use cases

What’s our agenda?

About Ted HustedCo-author of JUnit in Action (1st Edition)

Speaker at Ajax Experience, ApacheCon Business Analyst, NimbleUserMember, International Institute for Business Analysis (IIBA)Executive VP, Rochester NY IIBAtwitter.com/TedHusted

Do you take questions?

Slides Available at slideshare.net / ted.husted

How to write use casesThe

Why, What, Where, When, Who, and How

of use cases

Why? Actors Interact

Why? Change Happens

Why? Systems Adapt

What? Main Scenario

First Draft1. System sends puck

toward player.2. Player moves paddle to

meet puck.3. Puck intersects paddle 4. …

Second Draft1. System sends puck

toward player.2. Player moves paddle to

meet puck.3. Puck misses paddle.4. …

What? Main Scenario

What? Extensions

What? Annotations

What? Annotations

What? Annotations1a Browser does not provide cookie 1. System redirects to login page and passes

original URL through a parameter2. System authenticates user (UC-4)3. Return at Step 1

What? Annotations1a Browser does not provide cookie 1. System redirects to login page and passes

original URL through a parameter2. System authenticates user (UC-4)3. Return at Step 1

What? Annotations1a Browser does not provide cookie 1. System redirects to login page and passes

original URL through a parameterhttps://www.domain.org/sso/Signon.aspx?redirectUrl=default.aspx

2. System authenticates user (UC-4)3. Return at Step 1

What? AnnotationsExtensions

1a Browser does not provide cookie 1. System redirects to login page and passes

original URL through a parameter2. System authenticates user (UC-4)3. Return at Step 1

Annotations1a1 Example URL: https://www.domain.org/sso/Signon.aspx?redirectUrl=default.aspx

Where? Can use cases do it all?

Where? Requirements Outline 1. Vision and Scope Document2. Use Cases3. Software Requirements Specification4. Business Rules

Where? Requirements Outline 1. Findings2. Requirements3. Use Cases4. Technical Specification

When? Requirements Analysis

When? Organize and Allocate

Who? You …

Who? Them …

Who? Us!

How? Use Case Workflow1. Identify the actors2. Identify the use cases3. Identify actor/use case relationships4. Outline use cases5. Refine use cases

How? Use Case Workflow1. Identify the actors2. Identify the use cases3. Identify actor/use case relationships4. Outline use cases5. Refine use cases

How? Use Case Workflow1. Identify the actors2. Identify the use cases3. Identify actor/use case relationships4. Outline use cases5. Refine use cases

How? Use Case Workflow1. Identify the actors2. Identify the use cases3. Identify actor/use case relationships4. Outline use cases5. Refine use cases

How? Use Case Workflow1. Identify the actors2. Identify the use cases3. Identify actor/use case relationships4. Outline use cases5. Refine use cases

How? Use Case Workflow1. Identify the actors2. Identify the use cases3. Identify actor/use case relationships4. Outline use cases5. Refine use cases

How? Use Case Template1. Name2. Brief description3. Actors4. Main Scenario5. Extensions

1. Pre-conditions2. Post-conditions3. Other stakeholders4. System/sub-system5. Special requirements

How? Use Case Template1. Name2. Brief description3. Actors4. Main Scenario5. Extensions

1. Pre-conditions2. Post-conditions3. Other stakeholders4. System/sub-system5. Special requirements

How? Right-size templates1. Name2. Brief description3. Actors4. Main Scenario5. Extensions6. Pre-conditions7. Post-Conditions8. Other stakeholders9. System/sub-system

10. Special requirements

Adapt?

Adapt? Agile

Adapt? Agile

Adapt? Backlog1. Name2. Brief description3. Actors4. Main Scenario5. Extensions

1. Pre-conditions2. Post-conditions3. Other stakeholders4. System/sub-system5. Special requirements

Adapt? Iteration Planning1. Name2. Brief description3. Actors4. Main Scenario5. Extensions

1. Pre-conditions2. Post-conditions3. Other stakeholders4. System/sub-system5. Special requirements

Agile? Backlog Pruning1. Name2. Brief description3. Actors4. Main Scenario5. Extensions

1. Pre-conditions2. Post-conditions3. Other stakeholders4. System/sub-system5. Special requirements

Agile? Epic Iteration1. Name2. Brief description3. Actors4. Main Scenario5. Extensions

1. Pre-conditions2. Post-conditions3. Other stakeholders4. System/sub-system5. Special requirements

Adapt? Training Materials

Adapt? Quality Assurance

Adapt? TestingOpen Signin Page

Signin page: http://domain.org/sso/ Enter credentials

Username: mg Password: va123123

Process Succeeds System Creates Cookie

System Redirects

Adapt? TestingOpen Signin Page

Signin page: http://domain.org/sso/ Enter credentials

Username: mg Password: va123123

Process Succeeds System Creates Cookie

System Redirects

Adapt? TestingOpen Signin Page

Signin page: http://domain.org/sso/ Enter credentials

Username: mg Password: va123123

Process Succeeds System Creates Cookie

System Redirects

Adapt? TestingOpen Signin Page

Signin page: http://domain.org/sso/ Enter credentials

Username: mg Password: va123123

Process Succeeds System Creates Cookie

System Redirects

Adapt? TestingOpen Signin Page

Signin page: http://domain.org/sso/ Enter credentials

Username: mg Password: va123123

Process Succeeds System Creates Cookie

System Redirects

Automate?

Automate? Testing

Automate? Testing

Adapt? Testing

http://seleniumhq.org/

Resources

http://www.rose-hulman.edu/class/csse/csse371/csse371-2007-2008/Lectures/usecases.ppt

Any questions?

Slides Available at slideshare.net / ted.husted

Inventor of Pong, Alan Alcorn

DisclaimerAlan Alcorn is not Ted’s cousin,

but he did invent Pong, though without the help of use cases.

Use cases and Pong can both make you cross-eyed