Try free
8 min read Guide 769 of 877

Testing Strategies for Agile Teams

Testing is not a phase - it's continuous. GitScrum helps teams integrate testing into every sprint and deliver quality software consistently.

Testing Pyramid

Test Levels

TESTING PYRAMID:
┌─────────────────────────────────────────────────────────────┐
│                                                             │
│                      /\                                     │
│                     /  \     E2E TESTS                     │
│                    /    \    Few, slow, expensive          │
│                   /──────\   Test user journeys            │
│                  /        \                                 │
│                 /          \  INTEGRATION TESTS            │
│                /            \ Medium amount                │
│               /──────────────\ Test component interaction  │
│              /                \                             │
│             /                  \ UNIT TESTS                │
│            /                    \ Many, fast, cheap        │
│           /────────────────────── Test individual units    │
│                                                             │
│ ─────────────────────────────────────────────────────────── │
│                                                             │
│ RATIO GUIDELINE:                                            │
│ 70% Unit tests                                             │
│ 20% Integration tests                                      │
│ 10% E2E tests                                              │
│                                                             │
│ KEY PRINCIPLE:                                              │
│ Faster feedback = lower in pyramid                        │
│ Higher confidence = higher in pyramid                     │
│ Balance both needs                                        │
└─────────────────────────────────────────────────────────────┘

Testing in Sprints

Integrated Testing

TESTING WITHIN STORIES:
┌─────────────────────────────────────────────────────────────┐
│                                                             │
│ STORY WITH TESTING BUILT-IN:                                │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ PROJ-200: User Registration                             ││
│ │                                                         ││
│ │ ACCEPTANCE CRITERIA:                                     ││
│ │ ☐ User can register with email/password               ││
│ │ ☐ Email validation works                              ││
│ │ ☐ Password strength enforced                          ││
│ │ ☐ Confirmation email sent                             ││
│ │ ☐ Duplicate email prevented                           ││
│ │                                                         ││
│ │ TESTING REQUIREMENTS:                                    ││
│ │ ☐ Unit tests for validation logic                     ││
│ │ ☐ Integration test for registration flow              ││
│ │ ☐ E2E test for happy path                             ││
│ │ ☐ Edge cases tested                                    ││
│ │                                                         ││
│ │ EDGE CASES TO TEST:                                      ││
│ │ ☐ Invalid email formats                               ││
│ │ ☐ Weak passwords                                       ││
│ │ ☐ Duplicate registration                              ││
│ │ ☐ Email service failure                               ││
│ │                                                         ││
│ │ ESTIMATE: 5 points (includes testing)                  ││
│ └─────────────────────────────────────────────────────────┘│
│                                                             │
│ ANTI-PATTERN:                                               │
│ ❌ Story: 3 points                                        │
│ ❌ Separate "Testing" task: 2 points                     │
│                                                             │
│ CORRECT:                                                    │
│ ✅ Story: 5 points (testing included)                    │
│ ✅ Not done until tests pass                             │
└─────────────────────────────────────────────────────────────┘

QA Workflow

QA IN AGILE WORKFLOW:
┌─────────────────────────────────────────────────────────────┐
│                                                             │
│ CONTINUOUS QA (not end-of-sprint):                         │
│                                                             │
│ SPRINT TIMELINE:                                            │
│                                                             │
│ Day 1-2:                                                   │
│ • Dev starts feature                                      │
│ • QA reviews acceptance criteria                          │
│ • QA writes test cases                                    │
│                                                             │
│ Day 3-5:                                                   │
│ • Dev completes feature                                   │
│ • QA tests as features complete                          │
│ • Bugs fixed immediately                                  │
│                                                             │
│ Day 6-8:                                                   │
│ • Full feature testing                                    │
│ • Regression testing                                      │
│ • Polish and bug fixes                                    │
│                                                             │
│ Day 9-10:                                                  │
│ • Final verification                                      │
│ • Release preparation                                      │
│                                                             │
│ ─────────────────────────────────────────────────────────── │
│                                                             │
│ NOT THIS:                                                   │
│                                                             │
│ Day 1-7: Development                                      │
│ Day 8-10: QA (crammed, bugs found late)                  │
│                                                             │
│ → Bugs found late are expensive                           │
│ → Sprint ends with incomplete testing                     │
└─────────────────────────────────────────────────────────────┘

Test Automation

Automation Strategy

TEST AUTOMATION PLANNING:
┌─────────────────────────────────────────────────────────────┐
│                                                             │
│ WHAT TO AUTOMATE:                                           │
│                                                             │
│ HIGH VALUE (Automate first):                               │
│ ✅ Smoke tests (critical paths)                           │
│ ✅ Regression tests (things that broke before)            │
│ ✅ Data validation                                        │
│ ✅ API contracts                                          │
│ ✅ Security checks                                        │
│                                                             │
│ MEDIUM VALUE:                                               │
│ ✅ Feature tests (stable features)                        │
│ ✅ Integration tests                                      │
│ ✅ Performance baselines                                  │
│                                                             │
│ LOW VALUE (Keep manual):                                   │
│ ⚠️ Exploratory testing                                    │
│ ⚠️ UX testing                                             │
│ ⚠️ Visual testing (unless using tools)                   │
│ ⚠️ One-time tests                                        │
│                                                             │
│ ─────────────────────────────────────────────────────────── │
│                                                             │
│ AUTOMATION TASK:                                            │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ TEST-100: Automate checkout flow                       ││
│ │                                                         ││
│ │ Scope: E2E tests for checkout                          ││
│ │                                                         ││
│ │ Test cases:                                             ││
│ │ ☐ Guest checkout                                       ││
│ │ ☐ Logged-in checkout                                  ││
│ │ ☐ Apply coupon                                         ││
│ │ ☐ Multiple payment methods                            ││
│ │ ☐ Shipping options                                     ││
│ │ ☐ Order confirmation                                   ││
│ │                                                         ││
│ │ Framework: Cypress                                      ││
│ │ Run: CI pipeline + nightly                             ││
│ │                                                         ││
│ │ Estimate: 3 days                                        ││
│ └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘

Automation Debt

TEST AUTOMATION MAINTENANCE:
┌─────────────────────────────────────────────────────────────┐
│                                                             │
│ AUTOMATION PROBLEMS:                                        │
│                                                             │
│ FLAKY TESTS:                                                │
│ • Random failures → Team ignores results                  │
│ • Slow tests → Skip in CI                                 │
│                                                             │
│ MAINTENANCE BURDEN:                                         │
│ • UI changes break tests                                  │
│ • Tests coupled to implementation                        │
│                                                             │
│ ─────────────────────────────────────────────────────────── │
│                                                             │
│ AUTOMATION HEALTH TASK:                                     │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ TEST-MAINT: Quarterly test suite maintenance           ││
│ │                                                         ││
│ │ REVIEW:                                                  ││
│ │ ☐ Identify flaky tests                                 ││
│ │ ☐ List slowest tests                                   ││
│ │ ☐ Find duplicate coverage                             ││
│ │ ☐ Check test/code ratio                               ││
│ │                                                         ││
│ │ ACTIONS:                                                 ││
│ │ ☐ Fix or delete flaky tests                           ││
│ │ ☐ Optimize slow tests                                  ││
│ │ ☐ Remove redundant tests                              ││
│ │ ☐ Update test utilities                               ││
│ │                                                         ││
│ │ METRICS:                                                 ││
│ │ Flaky rate: 5% → Target: < 1%                         ││
│ │ Suite time: 45min → Target: < 20min                   ││
│ └─────────────────────────────────────────────────────────┘│
│                                                             │
│ ONGOING:                                                    │
│ • Allocate ~10% of sprint for test maintenance           │
│ • Fix flaky tests immediately (don't skip)               │
│ • Review coverage regularly                               │
└─────────────────────────────────────────────────────────────┘

Test Environments

Environment Management

TEST ENVIRONMENT TASKS:
┌─────────────────────────────────────────────────────────────┐
│                                                             │
│ ENVIRONMENTS:                                               │
│                                                             │
│ LOCAL:                                                      │
│ Developer machine                                          │
│ Fast iteration, unit tests                                │
│                                                             │
│ CI:                                                         │
│ Automated pipeline                                        │
│ Unit + integration tests                                  │
│                                                             │
│ STAGING:                                                    │
│ Production-like                                            │
│ Full E2E testing, QA testing                              │
│                                                             │
│ PRODUCTION:                                                 │
│ Real environment                                          │
│ Smoke tests, monitoring                                   │
│                                                             │
│ ─────────────────────────────────────────────────────────── │
│                                                             │
│ ENVIRONMENT TASK:                                           │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ ENV-01: Improve staging environment                    ││
│ │                                                         ││
│ │ ISSUES:                                                  ││
│ │ • Staging data is stale                                ││
│ │ • External services not mocked                        ││
│ │ • Environment often broken                             ││
│ │                                                         ││
│ │ IMPROVEMENTS:                                            ││
│ │ ☐ Weekly data refresh from anonymized prod            ││
│ │ ☐ Mock external payment gateway                       ││
│ │ ☐ Add environment health checks                       ││
│ │ ☐ Auto-deploy on merge to main                        ││
│ │                                                         ││
│ │ GOAL:                                                    ││
│ │ Staging should be reliable enough to catch            ││
│ │ issues before production                               ││
│ └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘

Bug Tracking

Bug Workflow

BUG MANAGEMENT:
┌─────────────────────────────────────────────────────────────┐
│                                                             │
│ BUG TASK TEMPLATE:                                          │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ BUG-123: Login fails with special characters           ││
│ │                                                         ││
│ │ SEVERITY: High                                          ││
│ │ FOUND IN: Staging                                       ││
│ │ REPORTED BY: QA                                         ││
│ │                                                         ││
│ │ STEPS TO REPRODUCE:                                      ││
│ │ 1. Go to login page                                    ││
│ │ 2. Enter email: test+1@example.com                    ││
│ │ 3. Enter password                                       ││
│ │ 4. Click Login                                          ││
│ │                                                         ││
│ │ EXPECTED: Login succeeds                               ││
│ │ ACTUAL: Error "Invalid email format"                   ││
│ │                                                         ││
│ │ ENVIRONMENT:                                             ││
│ │ Browser: Chrome 120                                     ││
│ │ OS: Windows 11                                          ││
│ │                                                         ││
│ │ ATTACHMENTS:                                             ││
│ │ [screenshot.png]                                       ││
│ │                                                         ││
│ │ ROOT CAUSE: (after investigation)                      ││
│ │ Email validation regex doesn't allow +                ││
│ │                                                         ││
│ │ FIX:                                                     ││
│ │ ☐ Update regex                                         ││
│ │ ☐ Add test case                                        ││
│ │ ☐ Verify fix                                           ││
│ └─────────────────────────────────────────────────────────┘│
│                                                             │
│ SEVERITY LEVELS:                                            │
│                                                             │
│ CRITICAL: System down, data loss                          │
│ → Fix immediately, same day                              │
│                                                             │
│ HIGH: Major feature broken                                │
│ → Fix this sprint                                        │
│                                                             │
│ MEDIUM: Feature works with workaround                     │
│ → Plan for next sprint                                   │
│                                                             │
│ LOW: Minor issue, cosmetic                               │
│ → Add to backlog                                         │
└─────────────────────────────────────────────────────────────┘