Agile Use Cases: Balancing Utility with Simplicity - May 2009

Post on 05-Dec-2014

4.538 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 member of the International Institute for Business Analysis (IIBA), and the Executive Vice President Elect of the Rochester NY Chapter. Ted has published three books and several magazine articles on software development and testing, and he speaks at professional conferences and conventions on a regular basis. Ted Husted works in Pittsford NY with VanDamme Associates, a .NET integrator specializing in non-profits and associations.

Transcript of Agile Use Cases: Balancing Utility with Simplicity - May 2009

© International Institute of Business Analysis™

Agile Analysis with Use Cases: Balancing Agile Analysis with Use Cases: Balancing Utility with SimplicityUtility with Simplicity

May Program

Guest Speaker:Ted Husted

May 7, 2009

ROCHESTER, NYChapter

22© International Institute of Business Analysis™

AgendaAgenda 1. President’s Welcome and Chapter Update

2. Upcoming Programs 3. May Program with Guest Speaker Ted Husted

33© International Institute of Business Analysis™

Chapter UpdateChapter Update 1.  Chapter Board of Director Elections 2.  Chapter Charter 3.  Chapter Membership 4.  Chapter's social networks to join 5. Chapter Surveys 6.  Volunteer Opportunities

Chapter Website: rochesterny.theiiba.org

44© International Institute of Business Analysis™

Upcoming ProgramsUpcoming Programs Thursday, 6/4 – Chapter Launch Dinner Celebration and Special Guest Speaker Ernest Hicks on Effective Communication at Sanibel Cottage

Thursday, 7/16 – Summer Networking (i.e. – Happy Hour) at Pomodoro Grill

Thursday, 8/13 – Summer Networking at Pomodoro Grill

Thursday, 9/24 – Requirements Management Lunch Program with Guest speaker David Walker from Borland at Sanibel Cottage

 

55© International Institute of Business Analysis™

Upcoming ProgramsUpcoming Programs Thursday, 10/22 – Lunch event with Matt Smith from iRise at Sanibel Cottage

Thursday, 11/19 – Lunch event at Sanibel Cottage

Thursday, 12/10 – Holiday Party at Sanibel Cottage

Agile Analysis with Use CasesBalancing Simplicity with Utility

Presented by Ted Husted

VanDamme Associates, Inc.

twitter.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 steep

• 2b Puck angles for a corner shot

• 3a Player returns puck

• 3b Puck intersects center segment

• 3c Puck intersects outer segment

• 5a Player wins

Is that all there is?

• 2a Puck trajectory is too steep

• 2b Puck angles for a corner shot

• 3a Player returns puck

• 3b Puck intersects center segment

• 3c Puck intersects outer segment

• 5a Player wins

Is that all there is?

• 2a Puck trajectory is too steep

• 2b Puck angles for a corner shot

• 3a Player returns puck

• 3b Puck intersects center segment

• 3c Puck intersects outer segment

• 5a Player wins

Is that all there is?

• 2a Puck trajectory is too steep

• 2b Puck angles for a corner shot

• 3a Player returns puck

• 3b Puck intersects center segment

• 3c Puck intersects outer segment

• 5a Player wins

Is that all there is?

• 2a Puck trajectory is too steep

• 2b Puck angles for a corner shot

• 3a Player returns puck

• 3b Puck intersects center segment

• 3c Puck intersects outer segment

• 5a Player wins

Is that all there is?

• 2a Puck trajectory is too steep

• 2b Puck angles for a corner shot

• 3a Player returns puck

• 3b Puck intersects center segment

• 3c Puck intersects outer segment

• 5a Player wins

How do we win?

• 2a Puck trajectory is too steep

• 2b Puck angles for a corner shot

• 3a Player returns puck

• 3b Puck intersects center segment

• 3c Puck intersects outer segment

• 5a Player wins

How do we win?

• 2a Puck trajectory is too steep

• 2b Puck angles for a corner shot

• 3a Player returns puck

• 3b Puck intersects center segment

• 3c Puck intersects outer segment

• 5a Player wins• 1. 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 Cases

• 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

What’s our agenda?

Do you take questions?

Slides Available at slideshare.net / rochesterny.theiiba.org

How to write use cases

The Why, What, Where, When, Who,

and Howof use cases

Why? Actors Interact

Why? Change Happens

Why? Systems Adapt

What? Main Scenario

First Draft

1. System sends puck toward player.

2. Player moves paddle to meet puck.

3. Puck intersects paddle

4. …

Second Draft

1. 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? Annotations

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

original URL through a parameter

2. System authenticates user (UC-4)

3. Return at Step 1

What? Annotations

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

original URL through a parameter

2. System authenticates user (UC-4)

3. Return at Step 1

What? Annotations

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

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

2. System authenticates user (UC-4)

3. Return at Step 1

What? Annotations

Extensions

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

original URL through a parameter

2. 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 Document

2. Use Cases

3. Software Requirements Specification

4. Business Rules

Where? Requirements Outline

1. Findings

2. Requirements

3. Use Cases

4. Technical Specification

When? Requirements Analysis

When? Organize and Allocate

Who? You …

Who? Them …

Who? Us!

How? Use Case Workflow

1. Identify the actors

2. Identify the use cases

3. Identify actor/use case relationships

4. Outline use cases

5. Refine use cases

How? Use Case Workflow

1. Identify the actors

2. Identify the use cases

3. Identify actor/use case relationships

4. Outline use cases

5. Refine use cases

How? Use Case Workflow

1. Identify the actors

2. Identify the use cases

3. Identify actor/use case relationships

4. Outline use cases

5. Refine use cases

How? Use Case Workflow

1. Identify the actors

2. Identify the use cases

3. Identify actor/use case relationships

4. Outline use cases

5. Refine use cases

How? Use Case Workflow

1. Identify the actors

2. Identify the use cases

3. Identify actor/use case relationships

4. Outline use cases

5. Refine use cases

How? Use Case Workflow

1. Identify the actors

2. Identify the use cases

3. Identify actor/use case relationships

4. Outline use cases

5. Refine use cases

How? Use Case Template

A. Name

B. Brief description

C. Actors

D. Main Scenario

E. Extensions

F. Pre-conditions

G. Post-conditions

H. Other stakeholders

I. System/sub-system

J. Special requirements

How? Use Case Template

A. Name

B. Brief description

C. Actors

D. Main Scenario

E. Extensions

F. Pre-conditions

G. Post-conditions

H. Other stakeholders

I. System/sub-system

J. Special requirements

How? Right-size templatesA. Name

B. Brief description

C. Actors

D. Main Scenario

E. Extensions

F. Pre-conditions

G. Post-Conditions

H. Other stakeholders

I. System/sub-system

J. Special requirements

Adapt?

Adapt? Agile

Adapt? Backlog

A. Name

B. Brief description

C. Actors

D. Main Scenario

E. Extensions

F. Pre-conditions

G. Post-conditions

H. Other stakeholders

I. System/sub-system

J. Special requirements

Adapt? Iteration Planning

A. Name

B. Brief description

C. Actors

D. Main Scenario

E. Extensions

F. Pre-conditions

G. Post-conditions

H. Other stakeholders

I. System/sub-system

J. Special requirements

Agile? Backlog Pruning

A. Name

B. Brief description

C. Actors

D. Main Scenario

E. Extensions

F. Pre-conditions

G. Post-conditions

H. Other stakeholders

I. System/sub-system

J. Special requirements

Agile? Epic Iteration

A. Name

B. Brief description

C. Actors

D. Main Scenario

E. Extensions

F. Pre-conditions

G. Post-conditions

H. Other stakeholders

I. System/sub-system

J. Special requirements

Adapt? Training Materials

Adapt? Quality Assurance

Adapt? Testing• Open Signin Page 

– Signin page: http://domain.org/sso/ 

• Enter credentials – Username: mg  – Password:  va123123

• Process Succeeds – System Creates Cookie

• System Redirects

Adapt? Testing• Open Signin Page 

– Signin page: http://domain.org/sso/ 

• Enter credentials – Username: mg  – Password:  va123123

• Process Succeeds – System Creates Cookie

• System Redirects

Adapt? Testing• Open Signin Page 

– Signin page: http://domain.org/sso/ 

• Enter credentials – Username: mg  – Password:  va123123

• Process Succeeds – System Creates Cookie

• System Redirects

Adapt? Testing• Open Signin Page 

– Signin page: http://domain.org/sso/ 

• Enter credentials – Username: mg  – Password:  va123123

• Process Succeeds – System Creates Cookie

• System Redirects

Adapt? Testing• Open 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 / rochesterny.theiiba.org

About Ted Husted

• Co-author of JUnit in Action (1st Edition)

• Speaker at Ajax Experience, ApacheCon

• Business Analyst, VanDamme Associates

• Member, International Institute for Business Analysis (IIBA)

• Executive VP Elect, Rochester NY IIBA• twitter.com/TedHusted

Inventor of Pong, Alan Alcorn

Disclaimer

Alan 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

Thank you Ted!

Next Chapter Meeting:June 4, 2009

with Ernest Hicks“A speaker you don’t want to miss”