1. Licensed Under Creative Commons by Naresh Jain
Agile Testing
Embrace Uncertainty
Naresh Jain
naresh@agilefaqs.com
1
2. 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
3. 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 toTest
Source Agile/QA Testing - Elisabeth Hendrickson
3
4. 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 toTest
Release
Source Agile/QA Testing - Elisabeth Hendrickson
3
5. Licensed Under Creative Commons by Naresh Jain
Reality
Analyze, Design and Code Test/Bug Fix
Completed Code
handed off toTest
Inevitably, the project plan is revised
Source Agile/QA Testing - Elisabeth Hendrickson
4
6. Licensed Under Creative Commons by Naresh Jain
Reality
Analyze, Design and Code Test/Bug Fix
Completed Code
handed off toTest Release
Inevitably, the project plan is revised
Source Agile/QA Testing - Elisabeth Hendrickson
4
7. Licensed Under Creative Commons by Naresh Jain
Controlling the Chaos
Source Agile/QA Testing - Elisabeth Hendrickson
5
8. Licensed Under Creative Commons by Naresh Jain
Controlling the Chaos
Traditional testing practices attempt to manage the chaos (or at least
avoid the blame):
Source Agile/QA Testing - Elisabeth Hendrickson
5
9. 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
Source Agile/QA Testing - Elisabeth Hendrickson
5
10. 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
11. 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
12. 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
13. 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
14. 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
15. 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
17. Licensed Under Creative Commons by Naresh Jain
Project Management Triangle
Quality
??
Cost/Resource
Time
Scope
6
18. Licensed Under Creative Commons by Naresh Jain
Traditional cost profile
Lower cost of change through
higher quality software
7
19. 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
20. 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
22. Licensed Under Creative Commons by Naresh Jain
Building Quality into the Process
Toyoda Loom
8
23. Licensed Under Creative Commons by Naresh Jain
Source: Beyond Agile Software Development Becoming Lean, Mary Poppendieck, Poppendieck.llc
Utilization (%)
Lessons from Queuing theory
9
26. Licensed Under Creative Commons by Naresh Jain
50 %
done?
Traditional Software Development
10
27. Licensed Under Creative Commons by Naresh Jain
A better way of doing the same
Applying Lean Principles to
Software Development ...
11
28. 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
29. 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
30. Licensed Under Creative Commons by Naresh Jain
Fix / Integrate $
Test
Code
Design
Specifications
Use Cases /
Functional Specs
Requirements Gathering
Project Plan/Estimation
$
Inception
$
$
$
Traditional vs Agile
12
31. Licensed Under Creative Commons by Naresh Jain
Agile = Continuous Stream ofValue
iteration
1
iteration
2
iteration
3
iteration
4
iteration
5
iteration
6
iteration
7
Completed Working Features
Designed, Coded and Tested
Release 1 Release 2
Source Agile/QA Testing - Elisabeth Hendrickson
13
32. Licensed Under Creative Commons by Naresh Jain
Agile = Continuous Stream ofValue
iteration
1
iteration
2
iteration
3
iteration
4
iteration
5
iteration
6
iteration
7
Completed Working Features
Designed, Coded and Tested
Release 1 Release 2
Source Agile/QA Testing - Elisabeth Hendrickson
13
33. Licensed Under Creative Commons by Naresh Jain
Becoming Agile : DeliveringValue
Increase the rate of
delivery
(usually with
smaller increments)
Source Agile/QA Testing - Elisabeth Hendrickson
14
34. Licensed Under Creative Commons by Naresh Jain
Becoming Agile : Increasing Feedback
Increase the rate
and quality
of feedback
Source Agile/QA Testing - Elisabeth Hendrickson
15
35. Licensed Under Creative Commons by Naresh Jain
Becoming Agile : Reducing Waste
Reduce waste
Source Agile/QA Testing - Elisabeth Hendrickson
16
36. Licensed Under Creative Commons by Naresh Jain
Agile Umbrella
Agile
XP
Pragmatic
DSDM
Crystal Lean
Adaptive
Scrum
FDD
17
39. Licensed Under Creative Commons by Naresh Jain
Project 1 year
Releases 3 months
A typical XP Project
18
40. Licensed Under Creative Commons by Naresh Jain
Project 1 year
Iterations 2 weeks
Releases 3 months
A typical XP Project
18
41. Licensed Under Creative Commons by Naresh Jain
Project 1 year
Iterations 2 weeks
Days 1 day
Releases 3 months
A typical XP Project
18
42. 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
43. 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
44. Licensed Under Creative Commons by Naresh Jain
Source : http://www.extremeprogramming.org
19
45. 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
46. Licensed Under Creative Commons by Naresh Jain
Brian Marick’s Test Categorization
Business Facing
Technology Facing
SupportsProgramming
Critiqueproduct
21
47. Licensed Under Creative Commons by Naresh Jain
Brian Marick’s Test Categorization
Business Facing
Technology Facing
Acceptance Testing
Low-fi prototypes
Unit Testing
Exploratory Testing
UI and Usability Testing
Performance Testing
SupportsProgramming
Critiqueproduct
22
50. Licensed Under Creative Commons by Naresh Jain
Acceptance Test Driven Development
Story
Acceptance
Criteria
23
51. Licensed Under Creative Commons by Naresh Jain
Acceptance Test Driven Development
Iteration
Story
Acceptance
Criteria
23
52. Licensed Under Creative Commons by Naresh Jain
Acceptance Test Driven Development
Iteration
Automated
Acceptance
Tests
Story
Acceptance
Criteria
23
53. Licensed Under Creative Commons by Naresh Jain
Acceptance Test Driven Development
Iteration
Automated
Acceptance
Tests
Story
Acceptance
Criteria
Automated
Unit Test
23
54. Licensed Under Creative Commons by Naresh Jain
Acceptance Test Driven Development
Iteration
Automated
Acceptance
Tests
Automated
Acceptance
Tests
Story
Acceptance
Criteria
Automated
Unit Test
23
55. Licensed Under Creative Commons by Naresh Jain
Acceptance Test Driven Development
Iteration
Automated
Acceptance
Tests
Automated
Acceptance
Tests
Story
Acceptance
Criteria
Exploratory
Testing
Automated
Unit Test
23
56. Licensed Under Creative Commons by Naresh Jain
Acceptance Test Driven Development
Iteration
Automated
Acceptance
Tests
Automated
Acceptance
Tests
Story
Acceptance
Criteria
Acceptance
Criteria
Exploratory
Testing
Automated
Unit Test
23
57. Licensed Under Creative Commons by Naresh Jain
Acceptance Test Driven Development
Iteration
Automated
Acceptance
Tests
Automated
Acceptance
Tests
Story
Acceptance
Criteria
Acceptance
Criteria
Exploratory
Testing
Automated
UI Tests
Automated
Unit Test
23
58. Licensed Under Creative Commons by Naresh Jain
Acceptance Test Driven Development
Iteration
Automated
Acceptance
Tests
Automated
Acceptance
Tests
Story
Acceptance
Criteria
Acceptance
Criteria
Exploratory
Testing
Automated
UI Tests
T
E
S
T
S
P
E
R
F
O
R
M
E
N
C
E
Automated
Unit Test
23
59. Licensed Under Creative Commons by Naresh Jain
TDD Rhythm - Test, Code, Refactor
Test Driven Development
24
60. Licensed Under Creative Commons by Naresh Jain
TDD Rhythm - Test, Code, Refactor
Add a Test
Test Driven Development
24
61. Licensed Under Creative Commons by Naresh Jain
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the
Test
Test Driven Development
24
62. Licensed Under Creative Commons by Naresh Jain
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the
Test
Pass
Test Driven Development
24
63. Licensed Under Creative Commons by Naresh Jain
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the
Test
Fail
Pass
Test Driven Development
24
64. 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
65. 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
66. 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
67. 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
68. 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
69. 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
70. 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
71. 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
74. Licensed Under Creative Commons by Naresh Jain
Mike Cohn’s Testing Pyramid
GUI
Tests
Small in Number
Tools: Selenium, Sahi,Watir, Abbot, Frankenstein
25
75. Licensed Under Creative Commons by Naresh Jain
Mike Cohn’s Testing Pyramid
Acceptance
Tests
GUI
Tests
Small in Number
Tools: Selenium, Sahi,Watir, Abbot, Frankenstein
25
76. Licensed Under Creative Commons by Naresh Jain
Mike Cohn’s Testing Pyramid
Acceptance
Tests
GUI
Tests
Small in Number
Tools: Selenium, Sahi,Watir, Abbot, Frankenstein
At least one per story
Tools: Fit, FitNesse, RSpec, JBehave
25
77. Licensed Under Creative Commons by Naresh Jain
Mike Cohn’s Testing Pyramid
Unit Tests
Acceptance
Tests
GUI
Tests
Small in Number
Tools: Selenium, Sahi,Watir, Abbot, Frankenstein
At least one per story
Tools: Fit, FitNesse, RSpec, JBehave
25
78. Licensed Under Creative Commons by Naresh Jain
Mike Cohn’s Testing Pyramid
Unit Tests
Acceptance
Tests
GUI
Tests
Small in Number
Tools: Selenium, Sahi,Watir, Abbot, Frankenstein
At least one per story
Tools: Fit, FitNesse, RSpec, JBehave
At least one per class or module
Tools: xUnit,TestNG
25
80. Licensed Under Creative Commons by Naresh Jain
What is the Role of a Tester on
Agile Projects?
27
81. Licensed Under Creative Commons by Naresh Jain
What is the Role of a Tester on
Agile Projects?
Testers are part of the team
27
82. 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
83. 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
84. 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
85. 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
86. 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
88. Licensed Under Creative Commons by Naresh Jain
Challenges
Technical
Requirements are changing
Bringing Testing Forward
Moving from Manual Testing to Automation
28
89. Licensed Under Creative Commons by Naresh Jain
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
28
90. Licensed Under Creative Commons by Naresh Jain
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
28
91. 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