Agile Tour 2011
01/11/2011
Effective Testing in Agile Projects Agile Tour 2011 Fran O’Hara Inspire Quality Services e:
[email protected] w: www.inspireqs.ie t: +353 (0)1 2854510
© 2011 Inspire Quality Services 1
Inspire Quality Services
We provide Agile, Quality and Process Improvement Services such as
Consulting/Coaching: –
Training public/inhouse: – – – –
Strategic advice and hands-on Coaching/mentoring in areas such as agile, testing, process improvement, etc.
Agile: Certified/Advanced ScrumMaster, Succeeding with Agile/Scrum, Agile project management, Agile Testing, Product Owner training, Lean/Kanban, etc. Testing (ISTQB Foundation and Advanced Test Manager/Analyst, Risk-based testing, Test design techniques, Testing for developers, TMap®, Peer Reviews, UAT, etc.) Requirements/Business analysis Software project management
Assessments – –
Agile practices Industry standards and models such as CMMI®, TPI®, TMMi®, etc.
2
© Copyright Inspire Quality Services 2011
Page 1
Agile Tour 2011
01/11/2011
Agenda
Introduction to Agile/Scrum Test challenges with Agile/Scrum Agile Test Strategy & Automation Role of the tester Q&A
3
Raise hands and keep raised if ….. You have heard of Agile and Scrum You have at least a reasonable sense of what they mean Your organisation has tried Agile You have been directly involved working in Agile team(s) You work specifically in Agile Testing
4
© Copyright Inspire Quality Services 2011
Page 2
Agile Tour 2011
01/11/2011
Agile Manifesto “We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: – Individuals and interactions over processes and tools – Working software over comprehensive documentation – Customer collaboration over contract negotiation – Responding to change over following a plan “That is, while there is value in the items on the right, we value the items on the left more.” 5
Flipping the Iron Triangle FIXED
Scope/ RequirementsResources
Schedule Value Driven
Plan Driven ESTIMATED Scope/
Resources
Schedule Requirements
Quality Quality 6
© Copyright Inspire Quality Services 2011
Page 3
Agile Tour 2011
01/11/2011
7
Roles: -Scrum master -Scrum team -Product owner
Scrum
Retrospective
8
© Copyright Inspire Quality Services 2011
See www.controlchaos.com
Page 4
Agile Tour 2011
01/11/2011
User stories - CCC INVEST Card
As a I need so that
As a customer I search for users so that I can view their details Value: Med Risk: Low
Estimate: 3 pts
Independent Negotiable Valuable Estimable Small Testable
Confirmation •I can find users •I can use any search criteria I need •Once found I can view details •….
9
Conversation
BDD: In order to As a I want
Agenda
Introduction to Agile/Scrum Test challenges with Agile/Scrum Agile Test Strategy & Automation Role of the tester Q&A
10
© Copyright Inspire Quality Services 2011
Page 5
Agile Tour 2011
01/11/2011
Typical test/quality related challenges Insufficient focus on working software – stories not ‘done’
Nonfunctional issues Testing bottleneck Integration Testing
11
Effectiveness of automation strategy
Ineffective incremental test strategy Quality of unit tests
Developer buy-in for shared quality ownership
‘Agile’ without sufficient customer involvement
Role of the tester and test manager Distributed development
Effectiveness of automated tests Lack of technical expertise in test team
Hybrid implementations
Agenda
Introduction to Agile/Scrum Test challenges with Agile/Scrum Agile Test Strategy & Automation Role of the tester Q&A
12
© Copyright Inspire Quality Services 2011
Page 6
Agile Tour 2011
01/11/2011
Agile Test Strategy Risks – Similar product risks – Regression risk with high level of change
How many test levels? – XP appears to advocate two as part of a predefined test strategy Unit and Acceptance (both automated as part of Test Driven Development) Is system test no longer required?
– Automation reduces regression risk – Developers doing testing reduces risk of poor quality code – But how can a test strategy/approach be method rather than product based?
13
‘Acceptance’ Testing – is it enough? May not be…context/risk/strategy issue… – May not be fully automated – partial regression strategy needed – Expand to fuller ‘system’ tests Functional testing Non-functional testing – performance, usability, etc. – May still need end-to-end business scenario focused User Acceptance test, user story interaction tests, etc. – System integration testing issues – Etc. Strategy and scheduling issue – Adaptive, risk-driven 14
© Copyright Inspire Quality Services 2011
Page 7
Agile Tour 2011
01/11/2011
Agile Testing Quadrants
15
Testing within a Sprint Automated Acceptance/Story based Tests
Represent Executable requirements
Automated Unit Tests
Represent Executable Design specifications
Manual Exploratory Tests
Provides Supplementary feedback
16
© Copyright Inspire Quality Services 2011
Page 8
Agile Tour 2011
01/11/2011
Sprints and Testing Strategy Sprint 1 Dev + Test*
Sprint 2 Dev + Test*
Additional testing
Sprint 3 Dev + Test*
Additional testing
…
Additional Testing
*Sprint test = Automated Unit & Acceptance, Manual Exploratory Within a Sprint may need to perform additional testing as part of a defined but adaptive testing strategy e.g.: – – – – – – –
Additional exploratory testing Performance testing Usability testing Security testing System integration testing Combination/feature interaction testing Business cycle & end-to-end scenario testing – exercising multiple stories, end of month processing, etc.
Note: Ideally any testing needed should be included within the Sprint rather than being deferred….otherwise are we defining one ‘Done’ for Sprints and another for Release…?
Working software!! 17
Scrum
Can we avoid Stabilisation Sprint(s)? Sprint 1
Sprint 2
Sprint 3
Stabilization Sprint
Sprint 5
Sprint 6
Sprint 7
Stabilization Sprint
Not part of Scrum but sometimes used for: Less normal new features, more focus on integration, extra testing… More integration testing, non-functional requirements testing… During “regular” sprints target friendly first use – Beta customers and similar can use immediately after sprint
During “stabilization sprints”
– Team prepares a product for release – Useful during
active beta periods when transitioning a team to Scrum if quality isn’t quite where it should be on an initial release
Not ideal though….
18
© Copyright Inspire Quality Services 2011
Page 9
Agile Tour 2011
01/11/2011
Test Driven Development Probably the most effective single practice to improve quality Never write a single line of code unless you have a failing automated test Eliminate duplication Kent Beck Write the test Write the code Refactor 19
Test Driven Development Can be applied at all levels of test e.g. – Unit : Drives design
executable design specifications
‘Does the code do what the developer intended’
– Acceptance: Defines completion
executable requirements
‘Does the system do what the Customer requires’
Preventative/early testing – not new… but many benefits Testing takes on a specification role – A feature is not specified… Until it’s acceptance test is written.
– A feature is not done… Until all it’s acceptance tests pass.
– Acceptance and Unit tests become key requirements/feature and design artefacts
20
© Copyright Inspire Quality Services 2011
Page 10
Agile Tour 2011
01/11/2011
Acceptance Testing Automated Acceptance Testing – Design and Code for automation, cross functional test design workshops, separate test design from implementation… – Tools/Frameworks e.g.
FIT/Fitnesse Cucumber - for Behaviour driven development WatiR – web application testing in Ruby Selenium – record/playback and scripting for web testing
– Will still need exploratory testing for UI layer… Web Server
Web Browser
Web Server
Automation Library
Web Browser
Automation Library
21
The Automation Pyramid Manual tests
GUI
API/Service
Unit 22
© Copyright Inspire Quality Services 2011
Page 11
Agile Tour 2011
01/11/2011
Agenda
Introduction to Agile/Scrum Test challenges with Agile/Scrum Agile Test Strategy & Automation Role of the tester Q&A
23
Role of tester ‘The nature of the tester's role changes in iterative projects. We are no longer the high-profile victims, we are no longer the lonely advocates of quality, we are merely (!) competent service providers, collaborating with a group that wants to achieve high quality. ‘ Cem Kaner Dedicated testers bring two benefits: Focus on customer usage over technical implementation Focus on uncovering flaws over confirming completeness (Bret Pettichord)
24
© Copyright Inspire Quality Services 2011
Page 12
Agile Tour 2011
01/11/2011
Role of tester Involved continuously from start…e.g. – Facilitate communication between the technical & business stakeholders – Support early validation of requirements – Help the Customer/business stakeholders define acceptance criteria – Support creation of automated acceptance tests Or define for developers to script
– Expand scope of ‘acceptance’ tests see agile testing strategy
– Advise the team about overall risks and trends – Perform manual/exploratory tests 25
Questions/discussion your testing challenges and experiences... Contact Details:
[email protected]
26
© Copyright Inspire Quality Services 2011
Page 13