91
Licensed Under Creative Commons by Naresh Jain Agile Testing Embrace Uncertainty Naresh Jain [email protected] 1

Agile Testing

Embed Size (px)

DESCRIPTION

Agile Testing Overview Presentation

Citation preview

Page 2: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Objective

Introduce Agile Testing Concepts

Some background about Agile

Compare with Traditional Testing practices

Highlight the fundamental shift in Thought Process

Discuss some tools and techniques used

Some pointers to help you try some of these techniques

2

Page 3: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Traditional Software Development

With great optimism and the best of intentions, The Project Plan is announced

Analyze Design Code Test/Bug Fix

Requirements

Handed off to Dev

Completed Code

handed off to Tes

t

Source Agile/QA Testing - Elisabeth Hendrickson

3

Page 4: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Traditional Software Development

With great optimism and the best of intentions, The Project Plan is announced

Analyze Design Code Test/Bug Fix

Requirements

Handed off to Dev

Completed Code

handed off to Tes

t Release

Source Agile/QA Testing - Elisabeth Hendrickson

3

Page 10: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Controlling the Chaos Traditional testing practices attempt to manage the chaos (or at least avoid the blame):

“Last Defender of Quality” stance

Strict change management

Source Agile/QA Testing - Elisabeth Hendrickson

5

Page 11: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Controlling the Chaos Traditional testing practices attempt to manage the chaos (or at least avoid the blame):

“Last Defender of Quality” stance

Strict change management

Detailed preparation and up front planning

Source Agile/QA Testing - Elisabeth Hendrickson

5

Page 12: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Controlling the Chaos Traditional testing practices attempt to manage the chaos (or at least avoid the blame):

“Last Defender of Quality” stance

Strict change management

Detailed preparation and up front planning

Heavyweight documentation

Source Agile/QA Testing - Elisabeth Hendrickson

5

Page 13: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Controlling the Chaos Traditional testing practices attempt to manage the chaos (or at least avoid the blame):

“Last Defender of Quality” stance

Strict change management

Detailed preparation and up front planning

Heavyweight documentation

Strict entrance and exit criteria with sign-offs

Source Agile/QA Testing - Elisabeth Hendrickson

5

Page 14: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Controlling the Chaos Traditional testing practices attempt to manage the chaos (or at least avoid the blame):

“Last Defender of Quality” stance

Strict change management

Detailed preparation and up front planning

Heavyweight documentation

Strict entrance and exit criteria with sign-offs

Heavyweight test automation focused on regression

Source Agile/QA Testing - Elisabeth Hendrickson

5

Page 15: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Controlling the Chaos Traditional testing practices attempt to manage the chaos (or at least avoid the blame):

“Last Defender of Quality” stance

Strict change management

Detailed preparation and up front planning

Heavyweight documentation

Strict entrance and exit criteria with sign-offs

Heavyweight test automation focused on regression

Attempts at process enforcement Source Agile/QA Testing - Elisabeth Hendrickson

5

Page 17: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Project Management Triangle

Quality??

Cost/Resource

TimeSc

ope

6

Page 18: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Traditional cost profile

Lower cost of change through higher quality software

7

Page 19: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Traditional cost profile

Time spent:• Finding defects• Fixing Defects• Regression Testing• Deploying

Lower cost of change through higher quality software

7

Page 20: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Agile system cost profile

Traditional cost profile

Time spent:• Finding defects• Fixing Defects• Regression Testing• Deploying

More defects found

& corrected – causes lower cost of defect

correction

Lower cost of change through higher quality software

7

Page 21: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Building Quality into the Process

8

Page 22: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Building Quality into the Process

Toyoda Loom

8

Page 23: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Source: Beyond Agile Software Development Becoming Lean, Mary Poppendieck, Poppendieck.llc

Utilization (%)

Lessons from Queuing theory

9

Page 27: Agile Testing

Licensed Under Creative Commons by Naresh Jain

A better way of doing the same

Applying Lean Principles to Software Development ...

11

Page 28: Agile Testing

Licensed Under Creative Commons by Naresh Jain

End-to-End small slices

of work

A better way of doing the same

Applying Lean Principles to Software Development ...

11

Page 29: Agile Testing

Licensed Under Creative Commons by Naresh Jain

End-to-End small slices

of work

A better way of doing the same

20 % done = 100 % usable

Applying Lean Principles to Software Development ...

11

Page 30: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Fix / Integrate $

Test

Code

DesignSpecifications

Use Cases / Functional Specs

Requirements Gathering

Project Plan/Estimation

$

Inception

$

$

$

Traditional vs Agile

12

Page 31: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Agile = Continuous Stream of Value

iteration 1

iteration 2

iteration 3

iteration 4

iteration 5

iteration 6

iteration 7

Completed Working FeaturesDesigned, Coded and Tested

Release 1 Release 2

Source Agile/QA Testing - Elisabeth Hendrickson

13

Page 32: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Agile = Continuous Stream of Value

iteration 1

iteration 2

iteration 3

iteration 4

iteration 5

iteration 6

iteration 7

Completed Working FeaturesDesigned, Coded and Tested

Release 1 Release 2

Source Agile/QA Testing - Elisabeth Hendrickson

13

Page 36: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Agile Umbrella

Agile

XP

Pragmatic

DSDM

Crystal Lean

Adaptive

Scrum

FDD

17

Page 39: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Project 1 year

Releases 3 months

A typical XP Project

18

Page 40: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Project 1 year

Iterations 2 weeks

Releases 3 months

A typical XP Project

18

Page 41: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Project 1 year

Iterations 2 weeks

Days 1 day

Releases 3 months

A typical XP Project

18

Page 42: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Project 1 year

Iterations 2 weeks

Days 1 day

Tasks 2 hrs

Releases 3 months

A typical XP Project

18

Page 43: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Project 1 year

Iterations 2 weeks

Days 1 day

Tasks 2 hrs

Test-Code-Refactor Cycles 15 min

Releases 3 months

A typical XP Project

18

Page 45: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Key Questions

Are we building the right product?

Are we building the product right?

Business Facing

Technology Facing

20

Page 46: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Brian Marick’s Test Categorization

Business Facing

Technology Facing

Supp

orts

Pro

gram

min

gC

ritique product

21

Page 47: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Brian Marick’s Test Categorization

Business Facing

Technology Facing

Acceptance Testing Low-fi prototypes

Unit Testing

Exploratory TestingUI and Usability Testing

Performance Testing

Supp

orts

Pro

gram

min

gC

ritique product

22

Page 50: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Acceptance Test Driven Development

Story

Acceptance Criteria

23

Page 52: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Acceptance Test Driven DevelopmentIteration

Automated Acceptance

Tests

Story

Acceptance Criteria

23

Page 53: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Acceptance Test Driven DevelopmentIteration

Automated Acceptance

Tests

Story

Acceptance Criteria

Automated Unit Test

23

Page 54: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Acceptance Test Driven DevelopmentIteration

Automated Acceptance

Tests

AutomatedAcceptance

Tests

Story

Acceptance Criteria

Automated Unit Test

23

Page 55: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Acceptance Test Driven DevelopmentIteration

Automated Acceptance

Tests

AutomatedAcceptance

Tests

Story

Acceptance Criteria

ExploratoryTesting

Automated Unit Test

23

Page 56: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Acceptance Test Driven DevelopmentIteration

Automated Acceptance

Tests

AutomatedAcceptance

Tests

Story

Acceptance Criteria

Acceptance Criteria

ExploratoryTesting

Automated Unit Test

23

Page 57: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Acceptance Test Driven DevelopmentIteration

Automated Acceptance

Tests

AutomatedAcceptance

Tests

Story

Acceptance Criteria

Acceptance Criteria

ExploratoryTesting

Automated UI Tests

Automated Unit Test

23

Page 58: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Acceptance Test Driven DevelopmentIteration

Automated Acceptance

Tests

AutomatedAcceptance

Tests

Story

Acceptance Criteria

Acceptance Criteria

ExploratoryTesting

Automated UI Tests

TESTS

PERFORMENCE

Automated Unit Test

23

Page 59: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Test Driven Development

24

Page 60: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Add a Test

Test Driven Development

24

Page 61: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Add a Test

Run the Test

Test Driven Development

24

Page 62: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Add a Test

Run the Test

Pass

Test Driven Development

24

Page 63: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Add a Test

Run the Test

Fail

Pass

Test Driven Development

24

Page 64: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Add a Test

Run the Test

Make a little change

Fail

Pass

Test Driven Development

24

Page 65: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Add a Test

Run the Test

Make a little change

Run the Test

Fail

Pass

Test Driven Development

24

Page 66: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Add a Test

Run the Test

Make a little change

Run the Test

Fail

Fail

Pass

Test Driven Development

24

Page 67: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Add a Test

Run the Test

Make a little change

Run the Test

Fail

Pass

Fail

Pass

Test Driven Development

24

Page 68: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Add a Test

Run the Test

Make a little change

Run the Test

Refactor

Fail

Pass

Fail

Pass

Test Driven Development

24

Page 69: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Add a Test

Run the Test

Make a little change

Run the Test

Refactor

Fail

Pass

Fail

Pass

Test Driven Development

24

Page 70: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Add a Test

Run the Test

Make a little change

Run the Test

Refactor

Fail

Pass

Fail

Pass

Test Driven Development

24

Page 71: Agile Testing

Licensed Under Creative Commons by Naresh Jain

TDD Rhythm - Test, Code, Refactor

Add a Test

Run the Test

Make a little change

Run the Test

Refactor

Fail

Pass

Fail

Pass

Test Driven Development

24

Page 74: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Mike Cohn’s Testing Pyramid

GUITests

Small in NumberTools: Selenium, Sahi, Watir, Abbot, Frankenstein

25

Page 75: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Mike Cohn’s Testing Pyramid

AcceptanceTests

GUITests

Small in NumberTools: Selenium, Sahi, Watir, Abbot, Frankenstein

25

Page 76: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Mike Cohn’s Testing Pyramid

AcceptanceTests

GUITests

Small in NumberTools: Selenium, Sahi, Watir, Abbot, Frankenstein

At least one per storyTools: Fit, FitNesse, RSpec, JBehave

25

Page 77: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Mike Cohn’s Testing Pyramid

Unit Tests

AcceptanceTests

GUITests

Small in NumberTools: Selenium, Sahi, Watir, Abbot, Frankenstein

At least one per storyTools: Fit, FitNesse, RSpec, JBehave

25

Page 78: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Mike Cohn’s Testing Pyramid

Unit Tests

AcceptanceTests

GUITests

Small in NumberTools: Selenium, Sahi, Watir, Abbot, Frankenstein

At least one per storyTools: Fit, FitNesse, RSpec, JBehave

At least one per class or moduleTools: xUnit, TestNG

25

Page 81: Agile Testing

Licensed Under Creative Commons by Naresh Jain

What is the Role of a Tester on Agile Projects?

Testers are part of the team

27

Page 82: Agile Testing

Licensed Under Creative Commons by Naresh Jain

What is the Role of a Tester on Agile Projects?

Testers are part of the team

Works closely with customers to define acceptance tests for each story

27

Page 83: Agile Testing

Licensed Under Creative Commons by Naresh Jain

What is the Role of a Tester on Agile Projects?

Testers are part of the team

Works closely with customers to define acceptance tests for each story

Tests each story as it is complete

27

Page 84: Agile Testing

Licensed Under Creative Commons by Naresh Jain

What is the Role of a Tester on Agile Projects?

Testers are part of the team

Works closely with customers to define acceptance tests for each story

Tests each story as it is complete

Practices pair testing

27

Page 85: Agile Testing

Licensed Under Creative Commons by Naresh Jain

What is the Role of a Tester on Agile Projects?

Testers are part of the team

Works closely with customers to define acceptance tests for each story

Tests each story as it is complete

Practices pair testing

Provides continuous feedback to the team

27

Page 86: Agile Testing

Licensed Under Creative Commons by Naresh Jain

What is the Role of a Tester on Agile Projects?

Testers are part of the team

Works closely with customers to define acceptance tests for each story

Tests each story as it is complete

Practices pair testing

Provides continuous feedback to the team

Works closely with developers to do performance and other types of testing

27

Page 88: Agile Testing

Licensed Under Creative Commons by Naresh Jain

ChallengesTechnical

Requirements are changing

Bringing Testing Forward

Moving from Manual Testing to Automation

28

Page 89: Agile Testing

Licensed Under Creative Commons by Naresh Jain

ChallengesTechnical

Requirements are changing

Bringing Testing Forward

Moving from Manual Testing to Automation

Organizational

Tester/Developer roles are blurred

Dev/Test Teams might be separate

Everyone has not bought into agile practices

28

Page 90: Agile Testing

Licensed Under Creative Commons by Naresh Jain

ChallengesTechnical

Requirements are changing

Bringing Testing Forward

Moving from Manual Testing to Automation

Organizational

Tester/Developer roles are blurred

Dev/Test Teams might be separate

Everyone has not bought into agile practices

People

28

Page 91: Agile Testing

Licensed Under Creative Commons by Naresh Jain

Agile/QA Testing - Elisabeth Hendrickson "Agile Testing Directions" - Brian Marick

Beck, K. (1999). Extreme Programming Explained: Embrace Change. Addison-Wesley. Cockburn, A. (2004). Crystal Clear: A Human- Powered Methodology for Small Teams. Crispin, L., & House, T. (2002). Testing Extreme Programming. Addison-Wesley. Poppendieck, M. & Poppendieck, T. (2003). Lean Software Development. Addison-Wesley. Schwaber, K. & Beedle, M. (2001). Agile Software Development with SCRUM. Prentice Hall.http://www.extremeprogramming.org

References

29