Skip to content
Tutorials Center
My learning

Topics

Lesson 4 of 60 ยท Testing Fundamentals

Testing in the SDLC

See where testing fits in waterfall, the V-model, iterative, agile and DevOps life cycles, and what shift-left and shift-right testing mean.

Software does not appear all at once. It goes through stages: someone has an idea, requirements are written, a design is made, code is built, it is checked, released and maintained. The pattern a team follows is called a software development life cycle (SDLC) model. Where testing happens, who does it and how often depend entirely on that model.

This lesson tours the main models, from the old sequential ones to modern continuous delivery, and shows where tests sit in each. Whatever the model, the principle from the seven testing principles holds: test activities should begin as early as is sensible, and every development activity should have a matching test activity.

Waterfall: test at the end

In the waterfall model, phases follow one another in a line: requirements, design, implementation, testing, deployment, maintenance. A phase is finished before the next begins.

  • Strength: clear milestones and documents; it suits projects whose requirements are stable and well understood.
  • Weakness for testing: testing is a late phase. Defects from requirements and design are found when building them is already finished, the point where the cost curve from What Is Software Testing? hurts most. If testing runs out of time, the project is tempted to cut it.

The V-model: a test level for every phase

The V-model keeps the sequential flow but fixes waterfall's main problem. Every development phase on the left side of the "V" has a matching test level on the right side, and test planning for each level starts when its development phase starts.

flowchart TB
  R["Requirements"] --> D["System design"] --> A["Detailed design"] --> C["Coding"]
  C --> U["Unit testing"] --> I["Integration testing"] --> S["System testing"] --> AT["Acceptance testing"]
  R -. "acceptance tests planned here" .-> AT
  D -. "system tests planned here" .-> S
  A -. "integration tests planned here" .-> I
  C -. "unit tests planned here" .-> U

Left side: building. Right side: checking. Each dotted line shows which test level is planned from which phase.

Two lessons from the V-model survive in every modern process:

  1. Testing is not one phase; it is a set of activities at several levels (see Test Levels).
  2. Test design can start early. While developers write the detailed design, testers can already prepare integration tests and review the document.

Iterative and incremental models

Instead of building everything in one pass, the team builds the product in slices. In an incremental model, each increment adds working features. In an iterative model, the team repeats a cycle (plan, build, evaluate) and refines the product each time. Many real processes are both.

For testing this means:

  • Testing happens in every iteration, not once at the end.
  • Regression testing becomes essential: each new increment may break features that worked before, so earlier tests must be re-run (see Test Types).
  • Because the cycles are short, test documentation tends to be lighter and tests are often automated.

Agile: testing is continuous

Agile methods such as Scrum and Kanban deliver small pieces of working software every few days or weeks, based on user stories that are refined as the team learns. Testing is built into the work of the whole team:

  • Testers join story discussions and help write acceptance criteria before coding starts.
  • A story is only "done" when it has been tested; the definition of done states this.
  • Testing never waits for a "testing phase", because there is none: every sprint contains analysis, building and testing.
  • Automated tests run on every change so that quick feedback is possible.
  • Exploratory testing complements automation because people notice what scripts do not.

Agile teams usually value whole-team ownership of quality and short feedback loops over heavy documents. The details of how a tester works inside a team are in Testing in Agile Teams and CI/CD.

DevOps and continuous delivery

DevOps joins development and operations, and continuous integration / continuous delivery (CI/CD) automates the path from a code change to a running product. Each change goes through a pipeline: build, automated tests, checks, deploy. Releases can happen many times a day.

Testing in this world has two big consequences:

  • Automated checks (unit, integration, some end-to-end) act as quality gates: a failing gate stops the change.
  • Testing does not stop at release. Teams watch the product in production (monitoring, logging, alerts, controlled rollouts) and treat what they learn as test information.

Shift-left and shift-right

Imagine the life cycle drawn as a timeline from left (ideas) to right (production).

  • Shift-left means moving test activities earlier: reviewing requirements, writing tests alongside code, running unit tests on every commit, involving testers in design. It finds defects when they are cheapest.
  • Shift-right means also testing after release, in the real environment: monitoring, canary releases (a new version goes to a small share of users first), A/B experiments, feature flags and learning from real incidents. It finds problems that only real users, real data and real load reveal.

The two are complementary, not opposites. Shift-left prevents the cheap problems; shift-right catches what could not be predicted in a lab.

Shift left, shift right

Shift-left Review and test early, before code is built on a mistake.
Shift-right Observe and test in production with real users.
Both Cheap fixes early, surprises caught late.

Mature teams do both.

1 / 2

Putting it on a timeline

The two stand-ins below are simplified models, not measurements from real projects. The first lists, for each life cycle model, in which phases testing activities typically happen; the second compares how long it takes a developer to hear that a change broke something.

JS Testing activities along the timeline

Press Run (or Ctrl + Enter) to see the console output here.

No output.

JS Feedback delay: how long does a defect hide?

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Notice what the second table says: the model matters less than the length of the feedback loop. The shorter it is, the fewer other changes pile up on top of a mistake, and the easier it is to find and fix.

Spiral and prototype models

Two more life cycle models appear in most syllabi.

The spiral model repeats four activities in loops: set objectives, analyze and reduce risks, build and test, then plan the next loop. Every loop produces a more complete version, and risk analysis, such as building a prototype of the scariest feature first, drives what happens next. It suits large, uncertain projects where mistakes are expensive. For testers, each loop includes a test activity, and risk-based thinking is built in (see Risk-Based Testing). The cost is management overhead, which is why it is rare in small teams.

The prototype model builds a quick, incomplete version first so users can react to it before the real system is built. Testing the prototype is mostly validation: do users recognise their need in it? The prototype is usually thrown away or heavily reworked, so test effort goes into feedback sessions and into requirements testability, not into detailed test cases for throw-away code.

The software testing life cycle (STLC)

The SDLC describes how a product is built. The software testing life cycle (STLC) describes how testing itself is organised inside it: a sequence of phases, each with entry criteria (what must be true to start) and exit criteria (what must be true to finish).

Phase Main activities Entry criteria Exit criteria
Requirement analysis Study requirements, find testable ones, list questions Requirements available Testable requirements agreed, questions answered
Test planning Scope, approach, estimate, risks, resources Requirements analysed Approved test plan
Test case development Design cases and data, set up traceability Approved plan Cases reviewed and approved
Environment setup Prepare servers, builds, accounts and data Plan and environment needs known Environment ready, smoke test passed
Test execution Run tests, log defects, retest and regression Build deployed, cases ready All planned tests run, defects reported
Test cycle closure Reports, metrics, lessons learned, sign-off Execution finished Summary report approved (see Test Closure)

STLC versus SDLC

SDLC STLC
Scope The whole product life, from idea to retirement Only the testing activities
Goal Deliver a working product Verify and validate the product
Phases Requirements, design, build, test, deploy, maintain Requirement analysis through closure
Relationship Contains the STLC Runs inside and overlaps the SDLC

The STLC phases are not strictly sequential. In waterfall they follow one another; in agile they are compressed and repeated in every sprint, and in a V-model each test level has its own mini life cycle.

JS Check STLC gates before moving on

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Here the traceability matrix is incomplete, so test case development is still open and everything after it waits, exactly what an exit criterion is for.

Choosing and mixing

In practice, few teams follow a model in its pure form. A company building aircraft software may use V-model-style traceability inside agile sprints, and a startup may use CI/CD with almost no documents. As a tester, you adapt: ask what the current process is, where the earliest useful testing could begin, and what slows feedback down. The right amount of formality depends on the product, the risk and the rules it must follow, which is principle six (context) again.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the key improvement of the V-model over a plain waterfall for testing?

    The V-model links each phase to a test level, so test planning and review begin early instead of waiting for a final testing phase.
  2. 2. Why is regression testing especially important in iterative and incremental development?

    New changes can unintentionally affect old behavior, so earlier tests are re-run in every iteration.
  3. 3. A team releases a new version to 5 percent of users first and watches error rates before releasing to everyone. Which idea is this?

    Testing and observing in production, using canary releases and monitoring, is the shift-right approach.
  4. 4. In an agile team, when is a user story considered done?

    Testing is part of the work for each story, so the definition of done includes it. There is no separate testing phase.

Summary

  • The SDLC model decides where testing happens and how it is organized, but testing should start early in every model.
  • Waterfall tests late; the V-model pairs each development phase with a test level; iterative and agile models test in every cycle and rely on regression testing.
  • DevOps and CI/CD run automated tests as quality gates and keep testing in production through monitoring.
  • Shift-left moves testing earlier to prevent defects cheaply; shift-right observes real usage to catch the rest. Use both.
  • Shorter feedback loops, more than any particular model, are what make defects cheap to fix.

Next up: Test Levels: Unit, Integration, System, Acceptance.