29
University of Calgary, February 2011 Janet Gregory, DragonFire Inc. Copyright 2010 With material from Lisa Crispin With material from Lisa Crispin

University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

University of Calgary, February 2011

Janet Gregory, DragonFire Inc.Copyright 2010

With material from Lisa CrispinWith material from Lisa Crispin

Page 2: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• A Little About a Tester’s World• Testing and Agile• Types of Testing• Types of Testing• Wrap‐up

Copyright 2011 DragonFire Inc. Copyright 2009: Janet Gregory, DragonFire 2

Page 3: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• have short iterations• encourage active customer participation• demand whole team collaborationdemand whole team collaboration• test features as they are codedd li b i l l i l• deliver business value at regular intervals

• adapt their processes based on feedback

…and so on………….

Copyright 2011 DragonFire Inc.

Page 4: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

Sequential, phased – eg. waterfallRequirementsq

Specifications

Code

Time

TestingRelease

Time

Agile: iterative incrementalF

C

Agile: iterative, incremental– Each story is expanded, coded and 

tested– Possible release after each iterationC

DC

D

FE

It 1 It 2 It 3

A B A BC

It 0

A BC

It 4

A BC

Copyright 2011 DragonFire Inc. 4

Page 5: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• Testing is an activity, not a phase• Collaborating with customers & developers• Collaborating with customers & developers• The whole team is committed to qualityTh h l t i t t b d• The whole team is test‐obsessed

• Focus is on the prevention of bugs, ◦ Not detection

Copyright 2011 DragonFire Inc. 5

Page 6: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• Integral part of the teamD i d l t ith t t• Drive development with tests

• Work with customers to define  acceptance tests for each story / feature

• Provide continuous feedback to the teamProvide continuous feedback to the team

• Provide constructive skepticismT t h t it i l t• Test each story as it is complete

Copyright 2011 DragonFire Inc. Copyright 2009: Janet Gregory, DragonFire 6

Page 7: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

Test Approach – The Agile WayProject Initiation Get an understanding of the project (business)

Participate in sizing stories Create Test PlanRelease/Project Participate in sizing stories Create Test Plan / jPlanning

Each Iteration1

Estimate tasks, Run regression testsCollaborate with customers on acceptance tests1

….X

Collaborate with customers on acceptance testsWrite. automate and execute new story tests

Pair test with other testers, developersPerform exploratory testing

Perform Load TestComplete Regression Test

Perform UATf k D l

System Test / End Game

Perform Mock DeployParticipate in Release Readiness

Participate in Release to ProdRelease to Prod/ Participate in RetrospectivesSupport

7

Page 8: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

Let’s talk a little  itesting ….

Copyright 2011 DragonFire Inc. 8

Page 9: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• Unit tests are the base layer◦ Provide the fastest feedback◦ Provide the fastest feedback◦ Best ROI

• Middle layer• Middle layer◦ becomes functional regression teststests

• GUI layer◦ May be partially automated◦ May be partially automated◦ Mostly exploratory testing

Copyright 2011 DragonFire Inc.

Page 10: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

The Agile Testing Quadrants (Brian Marick)

Copyright 2011 DragonFire Inc. Copyright 2009 Janet Gregory, DragonFire 10

Page 11: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

For each story / feature◦ No story is done until testedNo story is done until tested◦ Customer needs captured as passing tests◦ Automated regression testsAutomated regression tests

For release readiness◦ Delivers value◦ Delivers value◦ “Doneness” in all quadrants

Copyright 2011 DragonFire Inc. Copyright 2009 Janet Gregory, DragonFire 11

Page 12: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• Collaboration means …◦ working togetherworking together

• Communication means◦ sharing ideas information decisions & solutions◦ sharing ideas, information, decisions & solutions

• Tools for collaboration◦ Feedback◦ Feedback◦ Interaction◦ Visibility ‐ allows people to talk about itVisibility  allows people to talk about it.

Copyright 2011 DragonFire Inc. Copyright 2009 Janet Gregory, DragonFire 12

Page 13: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• Find hidden assumptionsA k “ h ?” A k “ h t if?”• Ask “why?” Ask “what if?”

• Define and estimate testing tasks• Ask what other tasks are required• Define high level story tests or examples

Copyright 2011 DragonFire Inc.Copyright 2009: Janet Gregory, 

DragonFire 13

Page 14: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• Think Quadrant 2 testsE th i t t f th t• Express the intent of the story

• Use examples as specific instances of a scenario• Think expected and unexpected behaviors• Gives a shared common understanding of theGives a shared common understanding of the story

• Feeds into TDD (Test Driven Development)• Feeds into TDD (Test Driven Development)

Copyright 2011 DragonFire Inc. 14

Page 15: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

Create a user story

Expand tests –

Story Tests

Write Customer  Start 

yAutomate Q2 Tests

Pair,“Show Me”

(Q2) Tests thinking how to code

TDD 

Exploratorytesting

Product owner

Customer User 

Product owner/ TesterTesterTester/ProgrammerProgrammer

Copyright 2011 DragonFire Inc. 15

AcceptanceProgrammer

Page 16: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

A IAs a new user, I want to create an account with a user name and password so that 

l I i f tionly I can access my information.===============================

Copyright 2011 DragonFire Inc. 16

Page 17: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• I enter a valid user name and password and l d i h d h ham logged into the system and on the home 

page.

• If I enter an invalid user name, I get an error message “Invalid User Name”, and I am able to try again.

• If I enter an invalid password, I get an errorIf I enter an invalid password, I get an error message “Invalid Password”, and I am able to try again.

Copyright 2011 DragonFire Inc.

try again.

17

Page 18: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

BDD – Behavioural Driven Development

Given the user has no existing accountWh h t t t tWhen she requests to create a new account,Then she is presented with a screen to enter a valid user name and valid password (rules defined) 

And the information is saved upon submitting.

Copyright 2011 DragonFire Inc. 18

Page 19: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

Acceptance Tests – Tabular Style

User Name Password Expected result comments

JanetGregory Password Login Valid combo saved

Janet Gregory Password Error Space in user name

JanetGregory Abc Error Invalid password

Copyright 2011 DragonFire Inc. 19

Page 20: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• Write detailed test cases from examplesM k th t bl if ibl◦ Make them executable if possible

• Write simple, happy path tests to automateSh h i h h◦ Share them with the programmers

• Once simple tests pass, write more test casesh h h◦ Start with happy path

◦ Then move towards edge casesId if ibl l i• Identify possible exploratory scenarios

Copyright 2011 DragonFire Inc. Copyright 2009: Janet Gregory, DragonFire 20

Page 21: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

U N P d E t d lt t

Expanded Tests Examples Expanded Tests Examples –– To To AutomateAutomateUser Name Password Expected result comments

JanetGregory Password Login Valid combo saved

Janet Gregory Password Error Space in user name

JanetGregory Abc Error Invalid password

Janet#Gregory Password Error Special char noJanet#Gregory Password Error Special char no allowed

Password Error Blank user name

JanetGregory Error Blank password

Copyright 2011 DragonFire Inc.

JanetGregory Password Error User already exists

Page 22: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• Is any testable part of a story ready?T t ith b hi d th GUI t l h FIT?◦ Test with behind‐the‐GUI tool such as FIT?◦ Or other harness to bypass GUI

• Pair with programmers• Pair with programmers• “Show Me”

h b f h k i◦ Test together before check‐in◦ Show them issuesA k ti◦ Ask questions◦ Bugs found here are cheap and easy to fix

Copyright 2011 DragonFire Inc. Copyright 2009: Janet Gregory, DragonFire 22

Page 23: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

(Cem Kaner, James Bach, Jon Bach, Jonathan Kohl, Elisabeth Hendrickson)

• Simultaneous learning, test design and test execution• Apply heuristics and techniques in a disciplined way• Doing reveals more implications than thinking• Like putting together a jigsaw puzzle• Use session based testing to◦ Time box your testing◦ Focus your efforts

d l◦ Record results

Copyright 2011 DragonFire Inc. Copyright 2007: Lisa Crispin and Janet Gregory 23

Page 24: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• Business Users and Testers ◦ Final manual GUI testing◦ Final regression tests (automated & manual)

• In some teams, the developers runIn some teams, the developers run◦ Load & performance tests◦ Stress testsSt ess tests

• Sometimes an implementation team◦ Tests installation or upgrade scripts◦ Tests installation or upgrade scripts

Copyright 2011 DragonFire Inc. 24

Page 25: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• Solve problems as a team• Is there one single limiting factor?• Is there one single limiting factor?◦ something holding you back

thi i bl it ti◦ something causing a blown iteration

• Action items◦ Focus on 1 or 2 things to improve◦ Create task cards for future iteration

Copyright 2011 DragonFire Inc. Copyright 2009: Janet Gregory, DragonFire 25

Page 26: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• Testers are NOT responsible for quality◦ The whole team is◦ The whole team is

• Programmers do not code alone◦ Everyone helps them understand what to code

• Your team needs the “right” roles and people• Your team needs the  right  roles and people◦ Those in transition may feel protective of roleN kill b d d◦ New skills may be needed

Copyright 2011 DragonFire Inc.

Page 27: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• Can’t “test quality in”Can t  test quality in

• Whole team solves problems

• Whole team thinks testing

• Everyone collaborates

• Team is committed to quality

Copyright 2011 DragonFire Inc. 27Copyright 2009 Lisa Crispin and Janet Gregory

Page 28: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

Now AvailableAgile Testing: A Practical Guide for Testers and Agile Teams

By Lisa Crispin and Janet Gregory

www.agiletester.ca

My contact infowww.janetgregory.cahttp://janetgregory.blogspot.com/Email: [email protected]

lwww.lisacrispin.comhttp://lisacrispin.comEmail: [email protected]

Copyright 2011 DragonFire Inc. 28

Page 29: University of Calgary, February 2011janetgregory.ca/.../2013/05/AgileTestingPractices-UofC.pdf · 2013-05-26 · • Simultaneous learning, test design and test execution • Apply

• www.lisacrispin.com• agile‐[email protected]• www.testobsessed.com (heuristics cheat sheet)• Mary Poppendieck and Tom Poppendieck, Lean Software Development,  Addison‐

Wesley (series of 3)• www.mountaingoatsoftware.com – Mike Cohn’s web site• http://www exampler com Brian Marick’s web site• http://www.exampler.com ‐ Brian Marick’s web site• Gojko Adzic, Bridging the Communication Gap, 2009• www.stickyminds.com/  Pragmatic Personas ‐ Jeff Patton’s weekly column 1/25/2010• Jean Tabaka Collaboration Explained 2006 Addison Wesley• Jean Tabaka, Collaboration Explained, 2006 Addison‐Wesley• Ester Derby and Dianne Larsen, Agile Retrospectives• http://www.uie.com/articles/indispensable_skills• Agile Manifesto: http://agilemanifesto org/• Agile Manifesto: http://agilemanifesto.org/• www.satisfice.com/articles/sbtm.pdf• www.developsense.com/2009/04/of‐testing‐tours‐and‐dashboards.html • James Whittaker Exploratory Software Testing 2009 Addison‐Wesley

Copyright 2011 DragonFire Inc.

James Whittaker, Exploratory Software Testing, 2009 Addison Wesley