I used Agile & Scrum to build my own app — Nutrify AI is FREE for all my students today! Try it on iOS →
Hindi
PSM-1 प्रमाणन
स्क्रम कार्यान्वयन
Agile Testing

Scrum में Agile Testing: सम्पूर्ण गाइड 2026

<a className="txt-link" href="https://www.teachingAgile.com/about">Abhay Talreja</a>

द्वारा Abhay Talreja

17/2/2026

मेरा नवीनतम लेख - Empirical Process Control - The Key to Agile Success

Agile Testing कोई ऐसी phase नहीं है जो development के बाद होती है - यह एक निरंतर discipline है जो हर Sprint, हर standup और कोड की हर line में बुनी हुई है। Scrum teams में, quality एक shared responsibility है: developers code से पहले tests लिखते हैं, पूरी team acceptance criteria define करती है, और tests कभी भी iteration के अंत में stack नहीं होतीं।

यह guide आपको agile testing को effectively implement करने के लिए वह सब कुछ cover करती है जो आपको चाहिए: Testing Pyramid, Agile Testing Quadrants, TDD/BDD/ATDD practices, shift-left strategies, industry-specific checklists, एक maturity model और सबसे common anti-patterns जो quality को undermine करते हैं।

आप क्या सीखेंगे

  • Agile testing, traditional QA से कैसे अलग है और यह बेहतर results क्यों produce करती है
  • Testing Pyramid और unit, integration और end-to-end tests का सही ratio
  • चार Agile Testing Quadrants और प्रत्येक type कब apply करें
  • TDD, BDD और ATDD Scrum के भीतर कैसे fit होते हैं
  • Shift-left testing और day one से quality कैसे integrate करें
  • Sprint Planning, Daily Scrum, Sprint Review और Retrospective के साथ testing कैसे map होती है
  • Healthcare, Fintech, E-commerce और अन्य के लिए industry-specific testing checklists
  • तीन-stage agile testing maturity model
  • आठ common testing anti-patterns और उन्हें कैसे fix करें

विषय सूची-

Quick Answer: Agile Testing एक नज़र में

पहलूAgile Testing
Testing कब होती हैCoding के बाद किसी phase में नहीं, बल्कि हर Sprint में continuously
कौन जिम्मेदार हैपूरी Scrum Team - developers, testers और Product Owner
मुख्य approachShift-left: code के पहले या साथ tests लिखें (TDD/BDD/ATDD)
Automation ratio70% unit tests, 20% integration tests, 10% end-to-end tests
Core frameworkTesting Pyramid और चार Agile Testing Quadrants
Key practicesTDD, BDD, ATDD, continuous integration, exploratory testing
Defect detectionEarly (Sprint के भीतर) बजाय late (release के बाद)

Agile Testing क्या है?

Agile Testing software quality assurance का एक approach है जो Agile values के साथ align होती है: collaboration, continuous feedback, customer focus और change के प्रति responsiveness। Testing को Sprint या release के अंत में एक handoff step के रूप में treat करने के बजाय, agile testing quality checks को directly development workflow में integrate करती है।

Traditional testing से मुख्य अंतर timing और ownership में है:

  • Traditional QA: Developers coding finish करते हैं, फिर एक separate QA team को hand off करते हैं, जो test करके defect list return करती है।
  • Agile Testing: Testing शुरू होती है code लिखे जाने से पहले (TDD और ATDD के माध्यम से), development के parallel चलती है और पूरी Scrum Team को involve करती है।

IBM के Systems Sciences Institute की research ने पाया कि release के बाद पाए गए defects को fix करना design के दौरान पाए गए defects से 6 गुना और coding के दौरान पाए गए defects से 15 गुना अधिक महंगा है।

Agile Testing के सिद्धांत

हर Scrum team के लिए छह core testing principles:

1. पूरी Team की Quality Ownership Testing कोई QA department function नहीं है। हर team member - developers, designers, testers और Product Owner - product quality के लिए accountability share करते हैं।

2. Continuous Testing, Phase-Based Testing नहीं Tests हर Sprint के दौरान constantly लिखे और execute किए जाते हैं। "Development done हो गई" तब तक test करने का इंतज़ार करने से bottleneck बनता है।

3. Customer-Centric Acceptance Criteria Product Owner Sprint work शुरू होने से पहले team के साथ clear acceptance criteria लिखता है।

4. Fast Feedback Loops Tests जल्दी run होने चाहिए। Unit test suites 5 minutes से कम में complete होनी चाहिए, और full CI pipeline runs 20 minutes से कम में।

5. Test Automation as First-Class Activity Automation sustainable speed में investment है। Teams जो regression testing automate करती हैं वे repetitive verification पर कम समय spend करती हैं।

6. Adaptable Testing Strategies Testing approaches sprint-over-sprint evolve होते हैं। Retrospective testing strategies को inspect और adapt करने का सही place है।

Testing Pyramid

Testing Pyramid, Mike Cohn द्वारा introduce किया गया, speed, cost और coverage के आधार पर test types को balance करने के लिए एक model provide करता है।

         /\
        /  \
       / E2E\     ~10% tests
      /------\
     /        \
    /Integration\  ~20% tests
   /------------\
  /              \
 /   Unit Tests   \  ~70% tests
/------------------\

Unit Tests (Base Layer)

Unit tests individual functions, methods या classes को external dependencies से complete isolation में verify करते हैं। ये हैं:

  • Fast: Milliseconds में run होते हैं, full suite 2 minutes से कम में
  • Cheap: लिखने में simple, maintain करने में easy
  • Precise: Exactly कौन सी function fail हुई pinpoint करते हैं
  • High-volume: Total test count का 70% target करें

Coverage target: Unit level पर >80% code coverage target करें।

Integration Tests (Middle Layer)

Integration tests verify करते हैं कि दो या अधिक components सही तरह से together work करते हैं:

  • Medium speed: Seconds से low minutes में run होते हैं
  • Medium cost: More setup required
  • Critical coverage: Database queries, API contracts, message queue interactions

Coverage target: 20% of your test count, critical integration points पर focus।

End-to-End Tests (Top Layer)

End-to-end (E2E) tests complete user journeys को UI से database तक simulate करते हैं:

  • Slow: Minutes में run होते हैं
  • Expensive: Full environment require करते हैं, UI changes के लिए brittle
  • High confidence: Critical user journeys काम करते हैं यह prove करते हैं
  • Low-volume: Total tests का 10% या कम रखें
⚠️

"Ice cream cone" anti-pattern तब होता है जब team का test suite inverted होता है: mostly slow E2E tests और बहुत कम fast unit tests। यह slow CI pipelines, fragile test suites और delayed feedback की ओर ले जाता है।

Agile Testing Quadrants

Brian Marick के Agile Testing Quadrants (Lisa Crispin और Janet Gregory द्वारा popularize किए गए) tests की विभिन्न categories, कौन उन्हें drive करता है और कब use करना है, इसके बारे में सोचने के लिए एक map provide करते हैं।

दो axes पर organized:

  • Horizontal: Technology-facing vs. Business-facing
  • Vertical: Team को support करने वाले tests vs. Product को critique करने वाले tests

Quadrant 1 - Team को Support करने वाले Technology-Facing Tests

Purpose: Developers को clean, correct code लिखने में guide करें।

Test types: Unit tests, component tests, integration tests

कौन drive करता है: Developers

Tools: JUnit, Jest, pytest, Vitest, Testcontainers

Quadrant 2 - Team को Support करने वाले Business-Facing Tests

Purpose: Confirm करें कि system वह करता है जो business को चाहिए।

Test types: Functional tests, examples और prototypes, story tests

कौन drive करता है: पूरी team - Product Owner criteria लिखता है, developers और testers उन्हें automate करते हैं

Tools: Cucumber, SpecFlow, FitNesse, Robot Framework

Quadrant 3 - Product को Critique करने वाले Business-Facing Tests

Purpose: वे defects और gaps ढूंढें जो team ने anticipate नहीं किए।

Test types: Exploratory testing, usability testing, user acceptance testing (UAT), Alpha/Beta testing

कौन drive करता है: Testers, UX specialists, real users, Product Owner

Quadrant 4 - Product को Critique करने वाले Technology-Facing Tests

Purpose: Realistic conditions में system की non-functional qualities evaluate करें।

Test types: Performance और load testing, security penetration testing, accessibility testing, stress testing

Tools: k6, JMeter, Gatling (performance); OWASP ZAP, Burp Suite (security); axe, Lighthouse (accessibility)

TDD, BDD और ATDD

ये तीन practices test-first thinking के विभिन्न levels represent करती हैं। ये complementary हैं, mutually exclusive नहीं।

Test-Driven Development (TDD)

TDD एक developer practice है जो tight Red-Green-Refactor cycle follow करती है:

  1. Red: एक failing unit test लिखें जो desired behavior describe करे
  2. Green: वह minimum production code लिखें जो test pass करने के लिए needed है
  3. Refactor: Tests को green रखते हुए code clean करें

TDD के benefits:

  • Developers को code लिखने से पहले design के बारे में सोचने के लिए force करता है
  • Natural byproduct के रूप में comprehensive unit test suite बनाता है
  • Debugging time reduce करता है क्योंकि failures immediately catch होते हैं

Behavior-Driven Development (BDD)

BDD TDD को upward extend करता है: individual functions test करने के बजाय, यह उन behaviors को test करता है जो business के लिए matter करते हैं। BDD Given-When-Then format use करता है।

BDD Example (Gherkin syntax):

Feature: Shopping cart discount
  Scenario: Customer receives discount on large order
    Given a customer has items worth $150 in their cart
    When they proceed to checkout
    Then a 10% discount of $15 should be applied
    And the total should be $135

Acceptance Test-Driven Development (ATDD)

ATDD story level पर BDD applied है। पूरी Scrum Team (Product Owner, developers और testers) मिलकर acceptance tests development शुरू होने से पहले define करती है।

"Three Amigos" meeting एक short session (30-60 minutes) है जहाँ Product Owner (business), एक developer (technology) और एक tester (quality) Sprint Planning से पहले मिलकर एक story review करते हैं। इसका goal misunderstandings surface करना और code लिखे जाने से पहले acceptance tests agree करना है।

Shift-Left Testing

Shift-left testing का मतलब है testing activities को development process में earlier move करना।

Traditional (Shift Right)Agile Shift-Left
QA code लिखे जाने के बाद review करती हैCoding शुरू होने से पहले acceptance criteria लिखे जाते हैं
Requirements finalize होने के बाद test plan बनाया जाता हैTesters Backlog Refinement में participate करते हैं
Defects एक dedicated test phase में पाए जाते हैंDefects same Sprint में found और fixed होते हैं
Performance testing major releases से पहलेPerformance benchmarks हर Sprint CI pipeline में
Deployment से पहले security reviewहर build में static analysis और SAST scanning

Scrum Sprint में Continuous Testing

Testing "Sprint के दौरान" एक single activity के रूप में नहीं होती। यह हर Scrum event और हर work day में embedded है।

Sprint Planning

  • Sprint Backlog items के लिए acceptance criteria review और refine करें
  • Per story testing approach (unit, integration, E2E) identify करें
  • Confirm करें कि Definition of Done में testing criteria शामिल है

Daily Scrum

  • Testing blockers surface करें
  • Previous day के test results share करें
  • Emerging defects identify करें multiply होने से पहले

Development के दौरान (हर दिन)

  • Developers code के पहले या साथ unit tests लिखते हैं (TDD)
  • Testers progress में stories के लिए automated acceptance tests लिखते हैं (ATDD)
  • CI pipeline हर commit पर run होती है: linting, unit tests, integration tests

Sprint Review

  • Sprint की शुरुआत में agreed acceptance criteria के against functionality demo करें
  • Stakeholders review के दौरान exploratory testing perform करें

Sprint Retrospective

  • Sprint से testing metrics review करें (coverage, defect escape rate, test execution time)
  • Testing bottlenecks या slow tests identify करें
  • Next Sprint के लिए testing strategy में improvements plan करें

Scrum में Testing Roles

Developers

  • Unit tests लिखें (TDD discipline)
  • अपने code के लिए integration tests लिखें
  • अपने defects उसी दिन fix करें जब वे found हों

Testers (QA Engineers)

  • Acceptance test design drive करें (ATDD facilitation)
  • Automated test suite build और maintain करें
  • Exploratory और session-based testing perform करें

Product Owner

  • हर story के लिए clear, testable acceptance criteria define करें
  • "Three Amigos" session में participate करें
  • Sprint Review में acceptance criteria के against implementation validate करें

Agile Teams के लिए Automation Strategy

क्या Automate करें:

  • Regression tests: कोई भी test जो manually दो बार से अधिक run किया गया
  • Smoke tests: हर CI build पर basic functionality checks
  • API tests: Services के बीच contracts validate करें
  • Data-driven tests: Same logic को different inputs के साथ repeat करने वाले tests
  • Acceptance tests: Acceptance criteria से derived BDD/Cucumber scenarios

क्या Manual रखें:

  • Exploratory testing: Unexpected behavior के लिए creative session-based exploration
  • Usability testing: Evaluate करना कि real users intuitively tasks accomplish कर सकते हैं या नहीं
  • One-time tests: Features के लिए tests जो release के बाद नहीं बदलेंगे

Industry-Specific Testing Checklists

SaaS / Cloud Services

  • Unit tests >80% code coverage के साथ passing
  • API contract tests सभी service versions के लिए pass
  • Load tests 1,000 concurrent users पर 95th percentile पर <200ms response time verify करते हैं
  • Multi-tenant data isolation verified (Tenant A, Tenant B का data access नहीं कर सकता)
  • Rollback procedures tested और documented

Healthcare Software (HIPAA/FDA)

  • सभी PHI (Protected Health Information) fields at rest और in transit encrypted
  • Audit logging tested: हर PHI access और modification एक immutable log entry generate करती है
  • Role-based access control verified
  • सभी user roles के लिए MFA enforcement tested

Financial Services (PCI-DSS / SOC 2)

  • PCI-DSS scope boundaries tested: Cardholder data defined zones से बाहर leak नहीं होता
  • Payment card numbers का tokenization verified
  • Fraud detection rules known fraud scenarios के against tested
  • Transaction atomicity verified

E-commerce / Retail

  • Cart calculation accuracy सभी discount, coupon और tax scenarios के लिए tested
  • Payment gateway integration sandbox mode में tested
  • Checkout flow peak traffic scenarios पर load-tested
  • Product inventory decrement atomic verified

Mobile Applications

  • UI iOS और Android के लिए minimum supported OS version और current OS version पर tested
  • Offline mode functionality tested
  • App launch time measured: Target devices पर <2 seconds cold start
  • Accessibility VoiceOver (iOS) और TalkBack (Android) के साथ tested

DevOps / Enterprise Infrastructure

  • Infrastructure-as-Code templates policy-as-code tools के साथ validated
  • Blue/green और canary deployment strategies tested
  • Circuit breaker behavior downstream service failure के under tested
  • Auto-scaling triggers defined CPU/memory thresholds पर tested

Agile Testing Maturity Model

Stage 1: Basic (Sprints 1-6)

Characteristics:

  • Testing mostly manual है, Sprint के end में done
  • Unit tests exist करते हैं लेकिन coverage inconsistent है (20-40%)
  • कोई CI pipeline नहीं या minimal एक

इस stage पर agile testing practices:

  • Sprint शुरू होने से पहले हर story के लिए acceptance criteria लिखें
  • Basic CI pipeline establish करें
  • New features पर TDD begin करें

Stage 1 के अंत तक target: हर story के written acceptance criteria हों; CI pipeline हर merge पर run हो; new code पर unit test coverage >40%।

Stage 2: Intermediate (Sprints 7-15)

Characteristics:

  • Unit test coverage 60-75% तक growing
  • CI pipeline automated unit और integration tests include करती है
  • Critical user journeys के लिए BDD scenarios written

इस stage पर practices:

  • "Three Amigos" session को standard practice के रूप में implement करें
  • हर PR पर run होने वाला regression test suite build करें
  • CI में performance benchmarks introduce करें

Stage 2 के अंत तक target: Unit test coverage >70%; defect escape rate 15% से नीचे।

Stage 3: Advanced (Sprint 16 और उसके बाद)

Characteristics:

  • Unit test coverage >80%
  • Staging के लिए automated deployment के साथ full CI/CD pipeline
  • Shift-left security: हर commit पर SAST scanning

Stage 3 के लिए target: Unit test coverage >80%; defect escape rate 5% से नीचे; CI pipeline 20 minutes से कम में complete।

8 Common Agile Testing Anti-Patterns

Anti-Pattern 1: Development "Done" होने के बाद Testing

Problem: Developers एक story को "done" declare करते हैं और तभी testers testing शुरू करते हैं।

यह problematic क्यों है: Sprint end पर testing bottleneck बनाता है। Late मिले defects developers के लिए context-switching require करते हैं।

Fix: "Done" को redefine करें tests passing require करने के लिए। ATDD apply करें ताकि testers tests लिखें जबकि developers code लिखें।

Anti-Pattern 2: Ice Cream Cone Test Suite

Problem: Team के पास 5 unit tests, 20 integration tests और 200 Selenium E2E tests हैं। CI pipeline 2 hours लेती है।

Fix: Pyramid को invert करें। हर E2E test के लिए 10 unit tests लिखें।

Anti-Pattern 3: Sprint Pressure में Tests Skip करना

Problem: Sprint में 2 दिन बचे हैं, team "deadline meet करने" के लिए tests लिखना skip कर देती है।

Fix: Definition of Done को exceptions के बिना enforce करें। Partially done story incorrectly "done" story से कम dangerous है।

Anti-Pattern 4: Testers केवल Bug Reporters के रूप में

Problem: Testers को finished features hand off की जाती हैं, वे bugs find करते हैं और log करते हैं। वे design, refinement या acceptance criteria में involved नहीं हैं।

Fix: Testers को Backlog Refinement, Sprint Planning और Three Amigos sessions में include करें।

Anti-Pattern 5: Fragile और Flaky Tests

Problem: Tests कभी pass होते हैं और कभी ऐसे reasons से fail होते हैं जो code से related नहीं हैं।

Fix: Flaky tests को critical bugs के रूप में treat करें। तुरंत quarantine करें और root causes fix करें।

Anti-Pattern 6: कोई Exploratory Testing नहीं

Problem: Team पूरी तरह scripted, automated tests पर rely करती है। कोई भी product को user की तरह explore करने में unscripted time spend नहीं करता।

Fix: हर Sprint में formal exploratory testing sessions schedule करें। SBTM approach use करें।

Anti-Pattern 7: Non-Functional Testing को Ignore करना

Problem: हर Sprint features produce करता है functional tests के साथ, लेकिन performance, security और accessibility कभी test नहीं होतीं।

Fix: Definition of Done में non-functional criteria add करें और CI में automated tools integrate करें।

Anti-Pattern 8: Test Environments Production से Mismatch

Problem: Tests development environment में pass होते हैं, लेकिन production में defects appear होते हैं।

Fix: Environment consistency सुनिश्चित करने के लिए containerization (Docker) use करें। Infrastructure-as-code use करें।

Key Testing Metrics

Metricक्या Measure करती हैTarget
Code CoverageUnit tests द्वारा exercise किए गए production code का percentage>80%
Defect Escape RateBugs का percentage जो staging या production reach करते हैं<5% mature teams के लिए
Test Execution TimeFull CI pipeline के लिए time<20 minutes
Flakiness RateFlaky (inconsistent) results के साथ test runs का percentage<1%
Automation CoverageAutomated vs. manual test cases का percentage>70% regression suite का

निष्कर्ष

Agile testing एक technique नहीं है - यह एक mindset है जो quality को continuous, shared responsibility के रूप में treat करती है। कोई भी Scrum team जो सबसे impactful changes कर सकती है:

  1. किसी भी code शुरू होने से पहले acceptance criteria लिखें (ATDD discipline)
  2. Testing Pyramid enforce करें: fast, reliable unit test foundation build करें
  3. Testing को CI में integrate करें ताकि हर commit को immediate feedback मिले
  4. Testers को हर planning और refinement conversation में include करें
  5. Defect escape rate track करें और Sprint over Sprint improve करें

Agile testing को underpin करने वाले quality standards के लिए, Definition of Done और Continuous Integration guides पढ़ें।

प्रश्नोत्तरी: Agile Testing

आपका स्कोर: 0/15

प्रश्न: Testing Pyramid के अनुसार, एक agile team के test suite में unit tests का recommended ratio क्या है?

आगे पढ़ें

Definition of Done: Examples और Checklistजानें कि Definition of Done आपकी Scrum team द्वारा ship किए गए हर Increment के लिए testing standards और quality criteria कैसे enforce करती है।
Continuous Integration - Scrum Development को Boost करेंDiscover करें कि CI/CD pipelines test execution को कैसे automate करती हैं और agile testing को continuous, always-on quality gate बनाती हैं।
Sprint 0: Objectives और Benefits का Complete Guideजानें कि Sprint Zero testing infrastructure कैसे establish करता है जो Sprint 1 से agile testing enable करती है।
Sprint Planning: Effective Scrum Execution के लिए आपका GuideSprint Planning master करें और जानें कि teams development शुरू होने से पहले acceptance criteria कैसे define करती हैं और testing activities कैसे plan करती हैं।
Sprint Review - एक Powerful Scrum Eventदेखें कि Sprint Reviews कैसे validate करती हैं कि delivered features Sprint की शुरुआत में agreed acceptance criteria meet करती हैं।
Sprint Retrospective: Team Performance को Boost करेंTesting metrics inspect करने, bottlenecks address करने और अपनी agile testing practice को continuously improve करने के लिए Sprint Retrospectives use करें।
Scrum Product Backlog: Essential Agile Artifact Master करेंसमझें कि clear acceptance criteria के साथ well-refined Product Backlog items effective shift-left testing कैसे enable करते हैं।
Sprint Execution: Scrum Teams Value कैसे Deliver करती हैंExplore करें कि agile testing daily Sprint execution में कैसे integrate होती है, पहले commit से final increment review तक।

अक्सर पूछे जाने वाले प्रश्न (FAQs)

Agile testing traditional Waterfall project में testing से कैसे differ करती है?

क्या एक Scrum team dedicated QA engineer के बिना agile testing practice कर सकती है?

Agile testing healthcare और finance जैसी industries में regulatory compliance को कैसे support करती है?

Agile testing adopt करते समय एक Scrum team को बिना existing tests के large legacy codebase कैसे handle करनी चाहिए?

Agile testing DevOps और Continuous Delivery pipelines के साथ कैसे integrate होती है?

Agile testing और test automation में invest करने का ROI क्या है?

Remote और distributed Scrum teams agile testing practices को कैसे adapt करती हैं?

Agile teams regression testing को कैसे handle करती हैं जैसे product Sprint over Sprint grows होता है?

Agile testing और Scrum में Definition of Done के बीच क्या relationship है?

Organizations same product पर काम करने वाले multiple Scrum teams across agile testing कैसे scale करती हैं?

Agile teams में testing effectiveness को कौन से psychological factors affect करते हैं?

Agile teams test data कैसे manage करें, especially GDPR जैसे privacy regulations वाले environments में?

Technical debt agile testing को कैसे affect करती है, और testing और code quality के बीच क्या relationship है?

Production में critical bug मिलने पर agile team को क्या करना चाहिए?

Agile testing accessibility और inclusive design को कैसे support करती है?