Software Testing Agile Testing

Agile testing is an approach where testing is continuous, collaborative, and woven into every part of the development cycle — not a separate phase at the end. In Agile, testers work side by side with developers and business stakeholders throughout each sprint.

Traditional vs Agile Testing

  TRADITIONAL (WATERFALL)           AGILE
  ───────────────────────           ─────
  Testing starts after dev          Testing starts on day one
  Testing is a separate phase       Testing runs inside every sprint
  Bugs found weeks later            Bugs found within days
  Testers isolated from devs        Testers and devs collaborate daily
  Long feedback loops               Short feedback loops (days)
  Large test phase at end           Continuous small test cycles

The Agile Sprint and Testing

  Sprint (1–2 weeks):

  Day 1–2:   Sprint planning
             Testers review user stories, write acceptance criteria

  Day 2–5:   Developers build features
             Testers prepare test cases, test data, environments

  Day 5–8:   Testing begins as features complete
             Bugs reported → Developers fix immediately

  Day 9:     Regression testing
             All sprint features tested together

  Day 10:    Sprint review and demo
             Retrospective → Team improves the process

  ─────────────────────────────────────────────────────────
  Next sprint begins immediately. Testing never stops.

The Agile Testing Quadrants

The Agile Testing Quadrants model, introduced by Brian Marick, organises testing activities into four categories based on purpose and audience.

           SUPPORT THE TEAM
                 ▲
                 │
   ┌─────────────┼──────────────┐
   │  Q2         │  Q1          │
   │  Functional │  Unit Tests  │
   │  Tests      │  Component   │
   │  Examples   │  Tests       │
   │  Story Tests│  (Automated) │
   ├─────────────┼──────────────┤
   │  Q3         │  Q4          │
   │  Exploratory│  Performance │
   │  Usability  │  Security    │
   │  UAT        │  Load Tests  │
   │  (Manual)   │  (Tools)     │
   └─────────────┴──────────────┘
                 │
          CRITIQUE THE PRODUCT

Q1 and Q2 are team-facing — they help developers build the right thing. Q3 and Q4 are product-facing — they evaluate the quality of what was built.

Shift-Left Testing

Shift-left means moving testing activities earlier in the development process — to the left on the project timeline.

  Traditional timeline:
  [Requirements] → [Design] → [Development] → [TESTING] → [Release]

  Shift-left timeline:
  [Requirements] → [Design] → [Development] → [Release]
       ↑               ↑            ↑
   Review reqs     Test design   Dev tests
   for testability  documents    own code

Shift-left reduces the cost and time of finding bugs by bringing testing closer to where bugs are created.

Test-Driven Development (TDD)

In TDD, the developer writes the test before writing the code. The test initially fails (because no code exists yet), then the developer writes just enough code to make the test pass, then refactors.

  TDD Cycle (Red → Green → Refactor):

  1. RED:    Write a test → Run it → It FAILS (no code yet)
  2. GREEN:  Write minimum code → Run test → It PASSES
  3. REFACTOR: Clean up the code → Tests still pass

  Repeat for every feature.

TDD produces code that is inherently testable, well-structured, and covered by tests from the start.

Behaviour-Driven Development (BDD)

BDD extends TDD by writing tests in plain business language that developers, testers, and business stakeholders all understand. Tests become the shared definition of what a feature should do.

  Feature: Transfer Money

  Scenario: Successful transfer between own accounts
    Given the user has a balance of ₹10,000 in Savings
    And the user has ₹500 in Current account
    When the user transfers ₹2,000 from Savings to Current
    Then the Savings balance should be ₹8,000
    And the Current balance should be ₹2,500

This scenario is written by the business analyst, reviewed by the developer, and automated by the tester — all from the same document.

The Role of Testers in Agile

  • Participate in sprint planning to review user stories and define acceptance criteria.
  • Collaborate with developers during development — not just after code is complete.
  • Provide fast feedback so bugs are fixed within the same sprint they are found.
  • Contribute to the definition of "done" — a shared agreement on what it means for a story to be complete.
  • Run exploratory testing sessions to find issues that scripted tests miss.
  • Maintain and improve the automated regression suite with every sprint.

Leave a Comment