Testing in an Agile Environment Understanding Testing role and techniques in an Agile development environment. Just enough, just in time!
Today s Topics How the Tester s Role Changes in Agile Testing in an Agile Framework Strategies to Apply to Testing
Origins of Agile Testing The Agile methods: Use most Testing Best practices Perform them differently Use different timing Add good practices to list
Scrum Overview Retrospective Pre-Sprint Prep Daily Stand-up Vision Roadmap Product Backlog Backlog Grooming Sprint Review Run Sprint Sprint Planning Sprint Demo 4
Progressive Test Planning Different levels of precision: Initiate Project Quality Objectives General Testing Strategies for Iterations & Releases Testing Roles/Responsibilities Plan Iteration Understand Acceptance Criteria for each User Story Iteration Testing Strategy Specific Activity Plan for Test Preparation & Testing Develop Product Increment Prepare Test Cases Ensure Product Quality
Sprint/Iteration Test Planning Retrospective Acceptance Criteria Discuss Stories ATDD Criteria Pre-Sprint Prep Vision Roadmap Product Backlog Backlog Grooming Daily Stand-up Sprint Review BDD Scenarios Run Sprint Testing Strategy Adapt from the Team s General Testing Strategy Specific Activity Plans: Test Preparation, Testing, etc. Sprint Planning Sprint Demo
Agile Team Members The Agile Team Customer & End Users Product Owner Management The rest of the team Scrum Master Other Teams
Who is Responsible for Quality? Product Owner? Scrum Master? The rest of the team Developers? Testers? Others? The Agile Team The rest of the team Product Owner Scrum Master
Team-Based Testing Approach The Agile Team Usability Testing Story Story Testing Testing End-to-End Testing Feature Testing Acceptance Testing Product Owner NonNonFunctional Functional Testing Testing Scrum Master The rest of the team Are we doing all of the Testing we should?
Product Owner Role in Testing The Agile Team Product Owner Scrum Master What is acceptable For each User Story? For each Feature? For the system? Who are the users? Their backgrounds? Their needs? Who should do the Acceptance Test? The rest of the team
Developers Role in Testing Understand requirements Discuss w/product Owner Ask questions Design, Automate and Perform tests Unit Tests TDD, ATDD Feature Tests Non-Functional tests Demonstrate product for Product Owner evaluation The Agile Team The rest of the team Product Owner Scrum Master
Agile Tester
Typical Agile Tester Role Support Product Owner and Developers Testing Clarify User Stories and Acceptance Criteria Assist with testing and interpreting test results Perform Additional Testing e.g. Exploratory Testing Negative Testing Special Scenarios The Agile Team Product Owner Scrum Master The rest of the team
Supporting the Team Agile Testing Quadrants Agile Testing Quadrants Business Facing Functional Tests Examples Story Tests Prototypes Simulations Unit Tests Component Tests Q2 Q3 Q1 Q4 Exploratory Testing Scenarios Usability Testing User Acceptance Testing Alpha/Beta Testing Performance & Load Test Security Testing ility Testing Critique the Product From More Agile Testing, Addison-Wesley, 2014 Technology Facing 1 Copyright 2015, Janet Gregory and Lisa Crispin
Just Enough Just in Time Low-Fidelity Models
Collaborative Test Design Use collaboration techniques e.g. Context Diagrams Mind Maps Brainstorming Others
Example: Context Diagram 17
Example: Testing Mind Map
Pairing with Developers Pair Programming is an Agile XP technique Pairing of Testers with Developers: The ultimate in collaboration Facilitates mutual learning Improves team efficiency Results in a higher-quality product
Test-Driven Development (TDD) AKA Test-First Development Focused on coding and unit testing Inspiration for other techniques: Acceptance Test-Driven Development (ATDD) Specification by Example Behavior-Driven Development (BDD)
Acceptance Test-Driven Dev (ATDD) Product Owner defines (prior to coding): Acceptance Criteria for each User Story Acceptance Tests (User Story, Feature, Product) Developers use Acceptance Tests: Ensure they develop what is needed Test for Doneness Testers collaborate with Product Owner and Developers
Example: Test-Driven Development Winston Consulting, 2015
Behavior-Driven Development (BDD) Like ATDD, but focused on System Behavior in response to User Behavior User Story Acceptance Criteria: 1 or more Given/When/Then Given (a particular scenario) When (the user does something) Then (this should be the result)
BDD Example Banking Application User Story: Transfer Money Between Accounts As a Bank Customer I need to transfer money between my accounts So that I have money where I need it to be Scenario1 (Insufficient funds): Given Account A has $125 available And Account B has $375 available When I transfer $200 from A to B Then I should see an error message And A should have $125 available And B should have $375 available Scenario2 (Sufficient funds): Given Account A has $125 available And Account B has $375 available When I transfer $200 from B to A Then I should see confirmation message And A should have $325 available And B should have $175 available
Exploratory Testing "a style of software testing treating test-related learning, test design, test execution, and test result interpretation as mutually supportive activities that run in parallel throughout the project. Cem Kaner Use Exploratory Testing when: Requirements are incomplete Time is lacking Each Testing Session: Charter & Plan Test & Explore Analyze & Learn
Example
Lightweight Documentation Apply the Agile Values and Principles Remember: Plan is a verb! Plan just-in-time Talk about everything that is important Document to remember what was said Write only what will be needed later Lightweight: Scenarios, Lists, Diagrams
Storyboarding
Traveler confirms with no options Storyboard Example: Check In Airline kiosk welcome screen with instructions to begin Traveler swipes an ID card Display of flight information for that traveler Traveler verifies flight Display of flight information for that traveler with options Display security messages while printing boarding pass System prints boarding pass Display Airline kiosk welcome screen with instructions to begin
Defect Tracking & Management Purposes: Ensure every defect is fixed or accepted Provide data for Metrics and analysis Options: Handle defects face-toface Write & manage Defect Stories Use a Defect or Issue Tracking System
Metrics Examples
Regression Tests Agile Values and Principles: We value responding to Change Welcome Change Every Agile Iteration = Change requires Regression Testing necessitates Test Automation
Time-Boxed Delivery Every Iteration results in a slice of product that is Production-Quality Done = Designed, Developed, Complete Fully Tested, Verified & Validated, Regression Tested Ready to ship, put in production & use
Release/End Game Decision to Release Functionality OK Quality Good Release Preparation Production Readiness Release Package Test Release Back-Out Test Release Release Activity Verification In-Production Final Check Sprint 1 Sprint 2 Sprint 3 Sprint 4 Sprint 5 Release
User Acceptance Test (UAT) In addition to approval by the Product Owner End Users: Prior to Release User Acceptance Test the product-to-date Provide feedback to the Agile team
Cross-Team Testing When whole product involves more than the Agile Team s work, e.g. Multiple Agile Development Teams Non-Agile Software Teams Other Development Besides Software Agile Tester must: Coordinate & Collaborate Ensure whole product/solution testing
Review Retrospective Pre-Sprint Prep Daily Stand-up Vision Roadmap Product Backlog Backlog Grooming Sprint Review Run Sprint Sprint Planning Sprint Demo 37
38