17

Click here to load reader

A (Brief) Introduction to Story Testing

Embed Size (px)

DESCRIPTION

So you’ve probably heard how agile people like to burn documentation. They may declare “WORKING SOFTWARE don’t need no stinkin’ documentation.” But here’s a secret: They love testing. (Or at least they say they do ;). As a software tester you need to know about story testing (a.k.a acceptance test driven development). When done well, story testing empowers a team to increase collaboration between business, testing, design, and developers. Oh, and it creates valuable, living documentation. We all know communicating what ought be built is one of the hardest parts of making great software. Story tests give you: * An artifact for collaboration about what should be built * Feedback on how close to done your software is * Safety to know when a change breaks existing functionality In this workshop, you’ll discover: * What story testing is * How to write story tests that provide maximum communicative power with minimum brittleness * How to break user stories and minimum marketable features into story tests

Citation preview

Page 1: A (Brief) Introduction to Story Testing

A Brief Introduction to Story Testing

By Zee Spencer

LeanDogA N A G I L E S O F T W A R E S T U D I O

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 2: A (Brief) Introduction to Story Testing

What The Heck Is Story Testing?!

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 3: A (Brief) Introduction to Story Testing

• Formal Scenarios

• That are Collaboratively Generated

• Which Focus On A Specific Aspect Of an Interaction

Story Tests Are

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 4: A (Brief) Introduction to Story Testing

• For a specific interaction

• Formats:

• Given/When/Then

• Permutation Tables

Formal Scenarios

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 5: A (Brief) Introduction to Story Testing

• Scenario: Buy 1 get 1 free

• Given a coupon which offers buy 1 get 1 free for a product

• When I buy 2 of that product

• Then I am only charged for 1 product

Given/When/Then

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 6: A (Brief) Introduction to Story Testing

• Scenario: Incompatible Coupons

• Given two coupons which can’t be used together

• When I try to use them both

• Then no discounts are applied to my cart

Given/When/Then

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 7: A (Brief) Introduction to Story Testing

• Scenario: Using coupons together

• Given two coupons which can be used together

• When I try to use them both

• Then both discounts are applied to my cart

Given/When/Then

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 8: A (Brief) Introduction to Story Testing

• Scenario: Fulfilling a coupon

• Given a coupon which requires you to buy a drink with your meal

• When I just buy a meal

• Then I cannot use the coupon

Given/When/Then

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 9: A (Brief) Introduction to Story Testing

Permutation Tables

Item Price

Apple $0.50

Pear $0.25

Coupon Discount Item

50%off 50% Any

10%off 10% Any

Background

Tests Cart Coupon Price

3xApple, 2xPear 10%off $1.80

5xApple, 10xPear 50%off $2.50

Scenario: Applying Percentage Discounts

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 10: A (Brief) Introduction to Story Testing

Collaboratively Generated

Whole Team

User Activity

User Tasks

User Test

Product Team

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 11: A (Brief) Introduction to Story Testing

Why?

• A Multitude of Perspectives Drives Out Uncertainty

• Collaboratively Determining Acceptance Criteria Shares Knowledge Faster Than a Handoff

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 12: A (Brief) Introduction to Story Testing

Specifically General

• Write scenarios for the happy path

• Write scenarios for edge cases and error conditions

• Write scenarios for performance cases

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 13: A (Brief) Introduction to Story Testing

Let’s Practice!

• Go to the story map nearest to you

• Start breaking the user tasks closest to the top down into scenarios

• Hint: There are no bad scenarios! Write collaboratively!

• In 15 minutes, we’ll reconvene and share

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 14: A (Brief) Introduction to Story Testing

Better Scenarios

• Keep them to 1 Given, 1 When, and 1 Then

• Write at a user goal abstraction

• Don’t use “click/type/etc” You’re writing for a person! not a computer!

• Use your personas!

• More Scenarios the merrier! Survival of the Fittest!

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 15: A (Brief) Introduction to Story Testing

Let’s Practice! (Again!)

• Go back to the story map nearest to you

• Write some more scenarios with your knew knowledge and feedback

• WRITE A BUNCH OF EM!

• In 15 minutes, we’ll reconvene.

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 16: A (Brief) Introduction to Story Testing

Some Final Secrets

• Awesome developers can automate these story tests so that they slowly turn on as development continues.

• When written well, scenarios can be used as living reference documentation for your application

• Iterate and Adapt!

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11

Page 17: A (Brief) Introduction to Story Testing

Some Giants Whose Shoulders I Stand On

Patrick Wilson Welsh

Jeff “Chzy” MorganLisa Crispin

Adam Goucher

Aslak HellesøyRobert C Martin

Angela Harms

Matt HeusserMel Bugai

Lanette Creamer

By @zspencer from @leandog. Leave feedback, ask questions and download materials at http://spkr8.com/t/8568

By @zspencer from @leandog. Leave feedback, ask questions and download materials at http://spkr8.com/t/8568

By @zspencer from @leandog. Leave feedback, ask questions and download materials at http://spkr8.com/t/8568

By @zspencer from @leandog. Download materials at http://spkr8.com/t/8568

Tuesday, October 11, 11