In the Waterfall Model chapter we saw a serious weakness: testing is a phase near the end. If testers only start thinking about the system after all the code is written, they discover requirement and design problems at the most expensive possible moment. Worse, nobody asked during the requirements phase, "How will we prove this requirement is met?"
The V-Model fixes this by giving every development phase a partner testing phase, and by planning that testing at the same time as the development work it checks.
The V-Model (Verification and Validation model) is a sequential software process model in which each development phase on the left arm of a "V" is paired with a corresponding testing phase on the right arm. Test plans are created during each development phase and executed later, after coding, in reverse order.
You can think of it as Waterfall bent into a V shape, with the testing side made just as important and just as planned as the building side.
The Intuition: Writing the Exam Paper Along with the Syllabus
A good teacher does not write the syllabus in June and then think about the final exam in December. While writing each unit's learning outcomes, she also notes how she will test them: "Unit 3 outcome: student can apply Dijkstra's algorithm. Test: a 10-mark numerical on a 6-node graph." At the end of the term, she simply runs the tests she planned.
The V-Model does the same. While writing requirements, you write acceptance tests. While designing the system, you write system tests. While designing modules, you write unit tests. Then, after coding, you climb up the right side of the V running those tests.
The V Diagram
VERIFICATION (left arm) VALIDATION / TESTING (right arm)
Requirements Analysis <-------------------------------> Acceptance Testing
\ (acceptance test plan written here) /
\ /
System Design <-----------------------------------> System Testing
\ (system test plan written here) /
\ /
Architecture (High-Level) Design <----------> Integration Testing
\ (integration test plan) /
\ /
Module (Low-Level) Design <-----> Unit Testing
\ (unit test plan) /
\ /
\ /
+------ CODING ------+
(bottom of the V)
Time flows down the left arm, through coding, and up the right arm.
Each horizontal arrow links a design phase to the test that checks it.The Left Arm: Verification Phases
1. Requirements Analysis
The team works with the customer to capture what the system must do (functional requirements) and how well (non-functional requirements such as performance, security, usability). The output is usually a requirements document; the chapter Software Requirements Specification (SRS) covers how to write one.
Test artefact produced: the acceptance test plan, describing how the customer will decide whether the delivered system is acceptable.
2. System Design
The requirements are turned into a description of the complete system: the hardware and software environment, major functions, external interfaces, and how the system behaves as a whole.
Test artefact produced: the system test plan, describing end-to-end tests of the whole integrated system, including non-functional tests such as load and security tests.
3. Architecture (High-Level) Design
The system is broken into modules (components), and the responsibilities of each module and the interfaces between them are defined.
Test artefact produced: the integration test plan, describing how modules will be combined and how the data passing between them will be checked.
4. Module (Low-Level) Design
Each module's internal logic is designed in detail: algorithms, data structures, function signatures, error handling.
Test artefact produced: the unit test plan, describing tests for each individual module or function.
5. Coding
At the bottom of the V, the modules are actually implemented. Code reviews and static analysis also happen here.
The Right Arm: Validation / Testing Phases
After coding, the team climbs up the right arm, executing the plans prepared earlier. Each test level checks its partner on the left.
Testing phase | Checks against | Question it answers | Usually done by |
|---|---|---|---|
Unit testing | Module (low-level) design | Does each module work correctly on its own? | Developers |
Integration testing | Architecture (high-level) design | Do modules work together through their interfaces? | Developers / testers |
System testing | System design and specified requirements | Does the complete system behave as specified, including performance and security? | Independent test team |
Acceptance testing | User requirements | Is this what the customer actually needs? Can it go live? | Customer / end users |
Each of these levels is covered in more depth later in Levels of Testing; here the focus is on how the V-Model links them to development.
Verification vs Validation
The model gets its name from these two words, and they are a favourite interview and exam topic. Barry Boehm's classic one-liners are the easiest way to remember them:
Verification: "Are we building the product right?"
Validation: "Are we building the right product?"
More precisely, in the spirit of the IEEE definitions: verification checks whether the output of a development phase satisfies the conditions set at the start of that phase (does the design faithfully follow the requirements?), while validation checks, during or at the end of development, whether the software meets its requirements and the user's real needs.
Aspect | Verification | Validation |
|---|---|---|
Question | Building the product right? | Building the right product? |
Checks | Each phase's work products against their specifications | The software against requirements and user needs |
Typical activities | Reviews, walkthroughs, inspections, static analysis | Executing the software: unit, integration, system, acceptance testing |
Code executed? | Usually not (static) | Yes (dynamic) |
Can it start before code exists? | Yes | Needs working code (though test design starts earlier) |
A subtle point: textbooks differ on exactly where to draw the line. Some call unit and integration testing "verification" because they check code against design, and reserve "validation" for system and acceptance testing. The safe, exam-friendly view is: left arm = verification activities (reviews of documents and designs), right arm = testing that validates the built software, with each right-side level checking its partner on the left.
Worked Example: Library Management System
Let us trace one feature, "charge a fine for late book returns", through the V.
Left-arm phase | What is written | Test planned at the same time |
|---|---|---|
Requirements | "Members returning books late must pay a fine shown at the counter." | Acceptance: librarian returns a book 10 days late in a real session and sees the correct fine on screen and receipt. |
System design | Web app + database; fine is computed when a return is recorded; receipt printed. | System: 200 simultaneous returns complete within 2 seconds each; fine appears on receipt. |
Architecture design | Modules: Circulation, Fine Calculator, Billing. Circulation calls | Integration: a late return in Circulation creates a correct bill entry in Billing. |
Module design |
| Unit: d = 0 → 0; d = 7 → 14; d = 10 → 29; d = −1 → error. |
Check the unit-test value for d = 10 by hand: first 7 days cost 7 × 2 = 14, the remaining 3 days cost 3 × 5 = 15, total ₹29.
Here is the unit test plan turned into runnable Python. It was designed during module design and executed right after coding, which is exactly the V-Model's bottom-right step.
import unittest
# Module (low-level) design: late_fine(days_late)
# 0 days -> Rs 0
# 1 to 7 days -> Rs 2 per day
# more than 7 -> Rs 14 + Rs 5 per day beyond the 7th
# negative days -> ValueError
def late_fine(days_late):
if days_late < 0:
raise ValueError("days_late cannot be negative")
if days_late <= 7:
return 2 * days_late
return 14 + 5 * (days_late - 7)
# Unit test plan written during module design, run after coding
class TestLateFine(unittest.TestCase):
def test_on_time(self):
self.assertEqual(late_fine(0), 0)
def test_within_first_week(self):
self.assertEqual(late_fine(7), 14)
def test_after_first_week(self):
self.assertEqual(late_fine(10), 29)
def test_negative_rejected(self):
with self.assertRaises(ValueError):
late_fine(-1)
if __name__ == "__main__":
unittest.main(verbosity=2)Output (Python 3.11 or later; older versions print slightly shorter test names):
test_after_first_week (__main__.TestLateFine.test_after_first_week) ... ok
test_negative_rejected (__main__.TestLateFine.test_negative_rejected) ... ok
test_on_time (__main__.TestLateFine.test_on_time) ... ok
test_within_first_week (__main__.TestLateFine.test_within_first_week) ... ok
----------------------------------------------------------------------
Ran 4 tests in 0.000s
OKWhy planning early helped: while writing the unit test plan, someone had to ask "what about negative days?" That question exposed a gap in the design before any code existed. Writing tests early is itself a form of verification of the design.
Advantages
Testing is planned from day one, so testability problems and ambiguous requirements are found early.
Clear traceability: every requirement and design element has a matching test level.
Higher chance of finding defects early than plain Waterfall, because test design reviews the documents.
Simple and disciplined, with well-defined deliverables for each phase, which suits audits and regulated industries.
Works well for small to medium projects with stable, well-understood requirements.
Disadvantages
Still sequential and rigid: like Waterfall, it handles changing requirements poorly. A requirement change means updating documents and test plans on both arms.
No working software until late: the customer sees the product only near the end.
No explicit risk analysis (unlike the Spiral Model) and no prototypes (unlike the Prototyping Model).
Not suitable for large, complex or evolving projects where requirements are expected to change.
When to Use the V-Model
Requirements are clear, fixed and well documented.
Technology is well understood.
Correctness and traceability matter a lot: medical devices, automotive and avionics software, banking modules. Safety standards in these fields commonly use V-shaped life cycles (for example, ISO 26262 for road vehicles describes its software development in a V-like structure).
Germany's government projects historically used a standard called the V-Modell (later V-Modell XT), one reason the model is well known in industry.
V-Model vs Waterfall
Aspect | Waterfall | V-Model |
|---|---|---|
Shape | Linear cascade | V, with development on the left and testing on the right |
When test planning starts | After coding (in the testing phase) | In parallel with each development phase |
Link between phases and tests | Implicit | Explicit one-to-one pairing |
Defect detection | Mostly late | Earlier, because test design reviews documents |
Handling change | Poor | Poor (both arms must be updated) |
Working software visible | Late | Late |
Quick Comparison with Other Models So Far
Model | Main idea | Best for |
|---|---|---|
Waterfall | Sequential phases | Small, stable projects |
Prototyping | Learn requirements from a quick model | Unclear, UI-heavy requirements |
Spiral | Risk-driven loops | Large, high-risk projects |
V-Model | Each phase paired with a test level | Stable requirements, high correctness needs |
Common Mistakes
Saying "testing starts only after coding" in the V-Model. Test execution starts after coding, but test planning and design start with requirements.
Pairing the wrong levels. Unit ↔ module design, integration ↔ architecture design, system ↔ system design, acceptance ↔ requirements. A common slip is pairing integration testing with requirements.
Thinking the V-Model is iterative. It is sequential, like Waterfall.
Swapping verification and validation. Verification = built right (against specs); validation = right thing built (against user needs).
Believing the V-Model handles change well because it has more testing. More testing does not make it flexible.
GATE and Interview Questions
In the V-Model, which testing phase corresponds to architectural (high-level) design?
Integration testing. Architecture design defines modules and their interfaces, and integration testing checks those interfaces when modules are combined.
Which testing phase validates the user requirements?
Acceptance testing, performed by or with the customer to decide whether the system is acceptable for use.
What is the key difference between the V-Model and Waterfall?
In the V-Model, test planning happens in parallel with each development phase, and each development phase has an explicitly paired test level. In Waterfall, testing is a single later phase.
Explain verification and validation in one line each.
Verification: are we building the product right (does each phase's output meet its specification)? Validation: are we building the right product (does the software meet the user's actual needs)?
Is a code review verification or validation?
Verification. It is a static check of a work product against its specification and standards, done without executing the code.
Why is the V-Model not suitable when requirements change frequently?
It is sequential: a requirement change forces updates to requirements, design documents and all the paired test plans, and the change may be discovered only late in the right arm. Iterative or Agile models handle change better.
Summary
The V-Model is a sequential model where each development phase (left arm) is paired with a testing phase (right arm), with coding at the bottom.
Pairs: Requirements ↔ Acceptance, System design ↔ System testing, Architecture design ↔ Integration testing, Module design ↔ Unit testing.
Test plans are written during development phases and executed after coding.
Verification = building the product right; validation = building the right product.
Strengths: early test design, traceability, discipline. Weaknesses: rigid, late working software, no risk analysis.
Best for stable requirements and safety- or correctness-critical systems.
Waterfall, Spiral and V-Model are all fairly heavy, plan-driven approaches. In the next chapter, Agile Methodology, we look at a very different philosophy: short iterations, working software every few weeks, and welcoming change instead of resisting it.