You are on page 1of 91

Agile Testing

Embrace Uncertainty Naresh Jain naresh@agilefaqs.com

Licensed Under Creative Commons by Naresh Jain


1

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

Licensed Under Creative Commons by Naresh Jain


2

Traditional Software Development


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

Analyze

Design

Code

Test/Bug Fix

s ent Dev m ire f to qu Re ed of and H

e od t C ed o Tes t ple off t m Co ded han


Source Agile/QA Testing - Elisabeth Hendrickson

Licensed Under Creative Commons by Naresh Jain


3

Traditional Software Development


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

Analyze

Design

Code

Test/Bug Fix

s ent Dev m ire f to qu Re ed of and H

e od t C ed o Tes t ple off t m Co ded han


Source Agile/QA Testing - Elisabeth Hendrickson

Release

Licensed Under Creative Commons by Naresh Jain


3

Reality
Inevitably, the project plan is revised

Analyze, Design and Code

Test/Bug Fix

e od t C s ted to Te ple off m Co ded han


Source Agile/QA Testing - Elisabeth Hendrickson

Licensed Under Creative Commons by Naresh Jain


4

Reality
Inevitably, the project plan is revised

Analyze, Design and Code

Test/Bug Fix

e od t C s ted to Te ple off m Co ded han


Source Agile/QA Testing - Elisabeth Hendrickson

Release

Licensed Under Creative Commons by Naresh Jain


4

Controlling the Chaos

Source Agile/QA Testing - Elisabeth Hendrickson

Licensed Under Creative Commons by Naresh Jain


5

Controlling the Chaos


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

Source Agile/QA Testing - Elisabeth Hendrickson

Licensed Under Creative Commons by Naresh Jain


5

Controlling the Chaos


Traditional testing practices attempt to manage the chaos (or at least avoid the blame): Last Defender of Quality stance

Source Agile/QA Testing - Elisabeth Hendrickson

Licensed Under Creative Commons by Naresh Jain


5

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

Licensed Under Creative Commons by Naresh Jain


5

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

Licensed Under Creative Commons by Naresh Jain


5

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

Licensed Under Creative Commons by Naresh Jain


5

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

Licensed Under Creative Commons by Naresh Jain


5

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

Licensed Under Creative Commons by Naresh Jain


5

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

Licensed Under Creative Commons by Naresh Jain

Project Management Triangle

Licensed Under Creative Commons by Naresh Jain


6

Project Management Triangle

op e

Quality ??

Tim

Sc

e
6

Cost/Resource
Licensed Under Creative Commons by Naresh Jain

Lower cost of change through higher quality software


Traditional cost prole

Licensed Under Creative Commons by Naresh Jain


7

Lower cost of change through higher quality software


Traditional cost prole

Time spent: Finding defects Fixing Defects Regression Testing Deploying

Licensed Under Creative Commons by Naresh Jain


7

Lower cost of change through higher quality software


Traditional cost prole

Time spent: Finding defects Fixing Defects Regression Testing Deploying

Agile system cost prole

More defects found & corrected causes lower cost of defect correction

Licensed Under Creative Commons by Naresh Jain


7

Building Quality into the Process

Licensed Under Creative Commons by Naresh Jain


8

Building Quality into the Process

Toyoda Loom

Licensed Under Creative Commons by Naresh Jain


8

Lessons from Queuing theory

Utilization (%)
Source: Beyond Agile Software Development Becoming Lean, Mary Poppendieck, Poppendieck.llc

Licensed Under Creative Commons by Naresh Jain


9

Traditional Software Development

Licensed Under Creative Commons by Naresh Jain


10

Traditional Software Development

Licensed Under Creative Commons by Naresh Jain


10

Traditional Software Development

50 % done?

Licensed Under Creative Commons by Naresh Jain


10

Applying Lean Principles to Software Development ... A better way of doing the same

Licensed Under Creative Commons by Naresh Jain


11

Applying Lean Principles to Software Development ... A better way of doing the same

End-to-End small slices of work

Licensed Under Creative Commons by Naresh Jain


11

Applying Lean Principles to Software Development ... A better way of doing the same

End-to-End small slices of work

20 % done = 100 % usable

Licensed Under Creative Commons by Naresh Jain


11

Traditional vs Agile
Project Plan/Estimation Requirements Gathering Use Cases / Functional Specs Design Specifications Code Test Fix / Integrate Inception $

$ $

Licensed Under Creative Commons by Naresh Jain


12

Agile = Continuous Stream of Value


Release 1 Release 2

iteration iteration iteration iteration iteration iteration iteration 1 2 3 4 5 6 7

Completed Working Features Designed, Coded and Tested


Source Agile/QA Testing - Elisabeth Hendrickson

Licensed Under Creative Commons by Naresh Jain


13

Agile = Continuous Stream of Value


Release 1 Release 2

iteration iteration iteration iteration iteration iteration iteration 1 2 3 4 5 6 7

Completed Working Features Designed, Coded and Tested


Source Agile/QA Testing - Elisabeth Hendrickson

Licensed Under Creative Commons by Naresh Jain


13

Becoming Agile : Delivering Value


Increase the rate of delivery (usually with smaller increments)

Source Agile/QA Testing - Elisabeth Hendrickson

Licensed Under Creative Commons by Naresh Jain


14

Becoming Agile : Increasing Feedback

Increase the rate and quality of feedback

Source Agile/QA Testing - Elisabeth Hendrickson

Licensed Under Creative Commons by Naresh Jain


15

Becoming Agile : Reducing Waste

Reduce waste

Source Agile/QA Testing - Elisabeth Hendrickson

Licensed Under Creative Commons by Naresh Jain


16

Agile Umbrella
Agile

XP DSDM Adaptive Crystal Lean Pragmatic FDD

Scrum

Licensed Under Creative Commons by Naresh Jain


17

A typical XP Project

Licensed Under Creative Commons by Naresh Jain


18

A typical XP Project
Project 1 year

Licensed Under Creative Commons by Naresh Jain


18

A typical XP Project
Project Releases 1 year 3 months

Licensed Under Creative Commons by Naresh Jain


18

A typical XP Project
Project Releases Iterations 1 year 3 months 2 weeks

Licensed Under Creative Commons by Naresh Jain


18

A typical XP Project
Project Releases Iterations Days 1 year 3 months 2 weeks 1 day

Licensed Under Creative Commons by Naresh Jain


18

A typical XP Project
Project Releases Iterations Days 1 year 3 months 2 weeks 1 day

Tasks

2 hrs

Licensed Under Creative Commons by Naresh Jain


18

A typical XP Project
Project Releases Iterations Days 1 year 3 months 2 weeks 1 day

Tasks

2 hrs

Test-Code-Refactor Cycles

15 min

Licensed Under Creative Commons by Naresh Jain


18

Source : http://www.extremeprogramming.org

Licensed Under Creative Commons by Naresh Jain


19

Key Questions
Business Facing

Are we building the right product? Are we building the product right?
Technology Facing
Licensed Under Creative Commons by Naresh Jain
20

Brian Maricks Test Categorization


Business Facing Supports Programming Critique product

Technology Facing
Licensed Under Creative Commons by Naresh Jain
21

Brian Maricks Test Categorization


Business Facing Supports Programming

Acceptance Testing Exploratory Testing Low- prototypes UI and Usability Testing Unit Testing Performance Testing

Critique product

Technology Facing
Licensed Under Creative Commons by Naresh Jain
22

Acceptance Test Driven Development

Licensed Under Creative Commons by Naresh Jain


23

Acceptance Test Driven Development

Story

Licensed Under Creative Commons by Naresh Jain


23

Acceptance Test Driven Development


Acceptance Criteria Story

Licensed Under Creative Commons by Naresh Jain


23

Acceptance Test Driven Development


Iteration

Acceptance Criteria Story

Licensed Under Creative Commons by Naresh Jain


23

Acceptance Test Driven Development


Acceptance Criteria Story
Automated Acceptance Tests
Iteration

Licensed Under Creative Commons by Naresh Jain


23

Acceptance Test Driven Development


Acceptance Criteria Story
Automated Acceptance Tests
Iteration

Automated Unit Test

Licensed Under Creative Commons by Naresh Jain


23

Acceptance Test Driven Development


Acceptance Criteria Story
Automated Acceptance Tests
Iteration

Automated Unit Test

Automated Acceptance Tests

Licensed Under Creative Commons by Naresh Jain


23

Acceptance Test Driven Development


Acceptance Criteria Story
Automated Acceptance Tests
Iteration

Automated Unit Test

Automated Acceptance Tests Exploratory Testing


Licensed Under Creative Commons by Naresh Jain
23

Acceptance Test Driven Development


Acceptance Criteria Story
Automated Acceptance Tests
Iteration

Automated Unit Test

Automated Acceptance Tests Exploratory Testing

Acceptance Criteria
23

Licensed Under Creative Commons by Naresh Jain

Acceptance Test Driven Development


Acceptance Criteria Story
Automated Acceptance Tests
Iteration

Automated Unit Test

Automated UI Tests
Automated Acceptance Tests Exploratory Testing

Acceptance Criteria
23

Licensed Under Creative Commons by Naresh Jain

Acceptance Test Driven Development


Acceptance Criteria Story
Automated Acceptance Tests
Iteration P E R F O R M E N C E

Automated Unit Test

Automated UI Tests
Automated Acceptance Tests Exploratory Testing

T E S T S

Acceptance Criteria
23

Licensed Under Creative Commons by Naresh Jain

Test Driven Development

TDD Rhythm - Test, Code, Refactor

Licensed Under Creative Commons by Naresh Jain


24

Test Driven Development


Add a Test

TDD Rhythm - Test, Code, Refactor

Licensed Under Creative Commons by Naresh Jain


24

Test Driven Development


Add a Test Run the Test

TDD Rhythm - Test, Code, Refactor

Licensed Under Creative Commons by Naresh Jain


24

Test Driven Development


Add a Test
Pass

Run the Test

TDD Rhythm - Test, Code, Refactor

Licensed Under Creative Commons by Naresh Jain


24

Test Driven Development


Add a Test
Pass

Run the Test


Fail

TDD Rhythm - Test, Code, Refactor

Licensed Under Creative Commons by Naresh Jain


24

Test Driven Development


Add a Test
Pass

Run the Test


Fail

TDD Rhythm - Test, Code, Refactor

Make a little change

Licensed Under Creative Commons by Naresh Jain


24

Test Driven Development


Add a Test
Pass

Run the Test


Fail

TDD Rhythm - Test, Code, Refactor

Make a little change Run the Test

Licensed Under Creative Commons by Naresh Jain


24

Test Driven Development


Add a Test
Pass

Run the Test


Fail

TDD Rhythm - Test, Code, Refactor

Make a little change Run the Test


Fail

Licensed Under Creative Commons by Naresh Jain


24

Test Driven Development


Add a Test
Pass

Run the Test


Fail

TDD Rhythm - Test, Code, Refactor

Make a little change Run the Test


Pass Fail

Licensed Under Creative Commons by Naresh Jain


24

Test Driven Development


Add a Test
Pass

Run the Test


Fail

TDD Rhythm - Test, Code, Refactor

Make a little change Run the Test


Pass Fail

Refactor
Licensed Under Creative Commons by Naresh Jain
24

Test Driven Development


Add a Test
Pass

Run the Test


Fail

TDD Rhythm - Test, Code, Refactor

Make a little change Run the Test


Pass Fail

Refactor
Licensed Under Creative Commons by Naresh Jain
24

Test Driven Development


Add a Test
Pass

Run the Test


Fail

TDD Rhythm - Test, Code, Refactor

Make a little change Run the Test


Pass Fail

Refactor
Licensed Under Creative Commons by Naresh Jain
24

Test Driven Development


Add a Test
Pass

Run the Test


Fail

TDD Rhythm - Test, Code, Refactor

Make a little change Run the Test


Pass Fail

Refactor
Licensed Under Creative Commons by Naresh Jain
24

Mike Cohns Testing Pyramid

Licensed Under Creative Commons by Naresh Jain


25

Mike Cohns Testing Pyramid


GUI Tests

Licensed Under Creative Commons by Naresh Jain


25

Mike Cohns Testing Pyramid


GUI Tests

Small in Number Tools: Selenium, Sahi, Watir, Abbot, Frankenstein

Licensed Under Creative Commons by Naresh Jain


25

Mike Cohns Testing Pyramid


GUI Tests

Small in Number Tools: Selenium, Sahi, Watir, Abbot, Frankenstein

Acceptance Tests

Licensed Under Creative Commons by Naresh Jain


25

Mike Cohns Testing Pyramid


GUI Tests

Small in Number Tools: Selenium, Sahi, Watir, Abbot, Frankenstein At least one per story Tools: Fit, FitNesse, RSpec, JBehave

Acceptance Tests

Licensed Under Creative Commons by Naresh Jain


25

Mike Cohns Testing Pyramid


GUI Tests

Small in Number Tools: Selenium, Sahi, Watir, Abbot, Frankenstein At least one per story Tools: Fit, FitNesse, RSpec, JBehave

Acceptance Tests

Unit Tests
Licensed Under Creative Commons by Naresh Jain
25

Mike Cohns Testing Pyramid


GUI Tests

Small in Number Tools: Selenium, Sahi, Watir, Abbot, Frankenstein At least one per story Tools: Fit, FitNesse, RSpec, JBehave

Acceptance Tests

Unit Tests

At least one per class or module Tools: xUnit, TestNG

Licensed Under Creative Commons by Naresh Jain


25

FitNesse and Selenium Demo

Licensed Under Creative Commons by Naresh Jain


26

What is the Role of a Tester on Agile Projects?

Licensed Under Creative Commons by Naresh Jain


27

What is the Role of a Tester on Agile Projects?


Testers are part of the team

Licensed Under Creative Commons by Naresh Jain


27

What is the Role of a Tester on Agile Projects?


Testers are part of the team Works closely with customers to dene acceptance tests for each story

Licensed Under Creative Commons by Naresh Jain


27

What is the Role of a Tester on Agile Projects?


Testers are part of the team Works closely with customers to dene acceptance tests for each story Tests each story as it is complete

Licensed Under Creative Commons by Naresh Jain


27

What is the Role of a Tester on Agile Projects?


Testers are part of the team Works closely with customers to dene acceptance tests for each story Tests each story as it is complete Practices pair testing

Licensed Under Creative Commons by Naresh Jain


27

What is the Role of a Tester on Agile Projects?


Testers are part of the team Works closely with customers to dene acceptance tests for each story Tests each story as it is complete Practices pair testing Provides continuous feedback to the team

Licensed Under Creative Commons by Naresh Jain


27

What is the Role of a Tester on Agile Projects?


Testers are part of the team Works closely with customers to dene 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
Licensed Under Creative Commons by Naresh Jain
27

Challenges

Licensed Under Creative Commons by Naresh Jain


28

Challenges
Technical Requirements are changing Bringing Testing Forward Moving from Manual Testing to Automation

Licensed Under Creative Commons by Naresh Jain


28

Challenges
Technical 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
Licensed Under Creative Commons by Naresh Jain
28

Challenges
Technical 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
Licensed Under Creative Commons by Naresh Jain
28

References
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. AddisonWesley. 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
Licensed Under Creative Commons by Naresh Jain
29

You might also like