Software Engineering basics - V-Model

The V-Model (also called the Verification and Validation Model) is a type of Software Development Life Cycle (SDLC) model. It’s an extension of the Waterfall model, where development and testing activities are planned in parallel.

The “V” shape represents the sequence of development activities on the left side and the corresponding testing activities on the right side.


Diagram of the V-Model

Here’s a simple textual representation of the V-Model:

              Requirements
                   |
                   v
         System Design (High-Level)
                   |
                   v
        Architecture Design (Low-Level)
                   |
                   v
           Module Design / Coding
                   |
                   v
          -----------------------
                   ^
                   |
           Unit Testing
                   ^
                   |
         Integration Testing
                   ^
                   |
         System Testing
                   ^
                   |
        Acceptance Testing

Or visually (simplified):

            Verification                    Validation
            ------------                    -----------
         |----------------|              |----------------|
         |  Requirements  | <--------->  | Acceptance Test|
         |----------------|              |----------------|
                 |                              ^
                 v                              |
         |----------------|              |----------------|
         |  System Design | <--------->  |  System Testing|
         |----------------|              |----------------|
                 |                              ^
                 v                              |
         |----------------|              |----------------|
         |  Architecture  | <--------->  | Integration Test|
         |----------------|              |----------------|
                 |                              ^
                 v                              |
         |----------------|              |----------------|
         |   Coding       | <--------->  |   Unit Testing  |
         |----------------|              |----------------|

Phases of the V-Model

Verification Phases (Left Side of V)

  1. Requirements Analysis

    • Collect and analyze user requirements.

    • Output: Software Requirement Specification (SRS).

    • Corresponds to: Acceptance Testing.

  2. System Design

    • Define system architecture and high-level design.

    • Output: System Design Documents.

    • Corresponds to: System Testing.

  3. Architecture Design (Low-Level Design)

    • Define module-level design and interfaces.

    • Output: Detailed Design Documents (DDD).

    • Corresponds to: Integration Testing.

  4. Module Design / Coding

    • Actual code is written for each module.

    • Output: Source Code.

    • Corresponds to: Unit Testing.


Validation Phases (Right Side of V)

  1. Unit Testing

    • Tests individual modules for correctness.

  2. Integration Testing

    • Tests the interaction between integrated modules.

  3. System Testing

    • Tests the complete system for compliance with requirements.

  4. Acceptance Testing

    • Conducted with end users to validate the system against business requirements.


Key Features

  • Testing is planned parallel to development.

  • Each development phase has a corresponding testing phase.

  • Reduces the risk of defects since testing starts early.

  • Suitable for small to medium-sized projects with well-defined requirements.


Advantages

  • Simple and easy to use.

  • Each phase has specific deliverables.

  • Testing and verification are performed at every stage.

  • Early detection of errors.


Disadvantages

  • Rigid and not suitable for projects with frequently changing requirements.

  • Not ideal for complex or iterative projects.

  • Requires detailed documentation at every phase.