The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With...

35
1 The Secret to Successful Test Automation Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory

Transcript of The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With...

Page 1: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

1

The Secret to Successful Test

Automation

Agile Denver, October 24, 2011

Lisa Crispin

With Material from Janet Gregory

Page 2: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

2

About me…

Programmer, tester, agile team member

Page 3: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

3

About you…

Pair up with the person next to you. Tell each other your team’s biggest obstacle to automating all your regression tests.

Page 4: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

We shall reveal:

The Secret to Successful Test Automation

Page 5: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

5

Let’s start by defining “agile”

Agile teams:

Deliver business value frequently

at a sustainable pace while adapting to the changing

needs of the business Source: Elisabeth Hendrickson

Page 6: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

6

The key is “sustainable pace”

Technical debt slows us down

Page 7: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

The Death Spiral

Page 8: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

High technical debt + insufficient automation = even less time

Page 9: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

9

Automated tests are code

public class CalculatorFixture extends

ColumnFixture { public String startDate; public String endDate; public double startBalance; public double endBalance; public String irrTarget; private Calculator calculator = new

Calculator(); private Double irr;

Page 10: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Test code deserves the same respect as production code!

Page 11: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Source: Gojko Adzic, StarEast 2011 keynote

Page 12: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Source: Gojko Adzic, StarEast 2011 keynote

Page 13: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

13

Testers are especially good at…

Eliciting examples Turning them into tests Ensuring the right testing

gets done Exploratory testing

Page 14: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

14

Give testers time to do what we do best

How?

Page 15: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

15

The Whole-Team Approach

Page 16: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

16

Ways to collaborate

Pair

Page 17: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

17

Test automation frameworks

Let non-programmers specify tests

Page 18: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

18

Continuous integration/testing…

…short feedback loop

Page 19: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

19

Team responsibility

Automate all regression tests

Page 20: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

20

Keep tests passing

Stop the line to fix problems

Page 21: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

21

Page 22: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

22

Commitment to quality

What’s your team’s commitment? The best possible software product?

Page 23: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

23

Learn

Experiment

Meaningful Commitment

Page 24: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

Under-commit

Plan less work than you think you can do Including all test automation

Page 25: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

25

Learn to write maintainable tests

Get over the “hump of pain”

From Gerard Meszaros’ XUnit Test Patterns

Page 26: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

Whole-team software development

26

Create a user story

Write Customer

(Q2) Tests

Start thinking how to code

Expand tests – Story Tests

Automate Q2 Tests

Exploratory testing

TDD

Customer User

Acceptance

Product owner Product owner/ Tester Tester Tester/Programmer Programmer

Pair, “Show

Me”

Page 27: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

Tackle automation with diversity

Use retrospectives Try small experiments No story is done until it’s

tested

Remember: It’s a Team Problem

Page 28: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

28

More about technical debt

www.agilistry.com/downloads/shortcut.pdf - The

Shortcut Game

www.jimhighsmith.com/2010/10/19/the-

financial-implications-of-technical-debt/

www.cutter.com/offers/technicaldebt.html -

Cutter technical debt issue (free with registration)

Articles on technical debt sprints (handouts)

Page 29: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin

29

Some Agile Testing Resources

lisacrispin.com janetgregory.ca exampler.com [email protected] testobsessed.com testingreflections.com dhemery.com gojko.net shino.de

Page 30: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin 30

Agile Testing: A Practical Guide for Testers and Agile

Teams

By Lisa Crispin and Janet Gregory

www.agiletester.ca

Page 31: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin Copyright 2008 Janet Gregory, DragonFire

31

Specification by Example

How successful teams deliver the right

software

Gojko Adzic

Case studies from > 50 teams

Page 32: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin 32

Managing Software Debt – Building for

Inevitable Change

Chris Sterling

Addison-Wesley, 2010

Page 33: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Copyright 2011: Lisa Crispin 33

All Proceeds to Charity!

Beautiful Testing: Leading Professionals Reveal How

They Improve Software

Edited by Tim Riley, Adam Goucher

Includes chapter by yours truly

Page 34: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

How will you get your team working together to automate tests?

Page 35: The Secret to Successful Test Automation · Agile Denver, October 24, 2011 Lisa Crispin With Material from Janet Gregory . ... Source: Gojko Adzic, StarEast 2011 keynote . ... thinking

Door Prizes!