V-Model in Software Engineering | V-Model in Software Testing

V-Model in software engineering

V-model is the software development life cycle (SDLC) model where the software development lifecycle process executes sequentially in a V-shape. It is also known as the Verification and Validation model. It is based on the idea of a “V” shape, with the two legs of the “V” representing the progression of the software development process from requirements gathering and analysis to design, implementation, testing, and maintenance.

V-model is based on the association of a testing phase for each corresponding development stage. The development of each step is directly associated with the testing phase. The next phase starts only after the completion of the previous phase, i.e., for each development activity, there is a testing activity corresponding to it.

Common Phases in V-Model

  1. Requirements gathering and analysis phase:  During this phase, the project team gathers and analyzes the customer’s requirements for the software to determine the scope of the project.
  2. Design: In the design phase, we develop the software architecture and design, including high-level and detailed designs.
  3. Implementation: The developers build software based on the design in the implementation phase.
  4. Testing: In the testing phase, the software is tested to ensure that it meets the customer’s requirements and is of high quality.

Verification Phases on V-Model

It involves a static analysis technique (review) done without executing code. It is the process of evaluating the product development phase to find whether specified requirements for customers are documented and contain all required information articulated by customers.

In the verification phase, it is also ensured that any gaps in requirements are clarified and updated before proceeding to next phases of development in V-Model.

There are several Verification phases in the V-Model:

1. Business Requirement Gathering and Analysis

This is the first step of the V-model phase where business requirements are gathered and analyzed for build feasibility.  These phases include proper communication with the customer to understand the customer’s requirements. These are critical activities that need to be handled properly, as most of the time, customers need to learn precisely what they want, and they are still deciding about it at that time.

2. System Design

System’s design will start when we are clear with the product requirements; we must design the system completely. This understanding will be at the beginning of the product development process. These are beneficial for the future execution of test cases.

3. Architectural Design

In this stage, architectural specifications are comprehended and designed. Usually, several technical approaches are put out, and the ultimate choice is made after considering both the technical and financial viability. The system architecture is further divided into modules that handle a distinct function. Another name for this is High high-level design (HLD).

Data exchange and communication between the internal modules and external systems are well understood and defined. Integration tests can be created and documented during this phase using the information provided.

4. Module Design

This phase, known as Low-Level Design (LLD), specifies the comprehensive internal design for every system module. Compatibility between the design and other external systems, as well as other modules in the system architecture, is crucial. Unit tests are a critical component of any development process since they assist in identifying and eradicating the majority of mistakes and flaws at an early stage.

5. Coding Phase

The Coding step involves writing the code for the system modules created during the Design phase. The system and architectural requirements determine which programming language is most appropriate.

When performing the coding, we follow the coding standards and principles. We undergo many code reviews and optimize the code for optimal performance before checking in the final build into the repository.

6. Validation Phases

Validation phases involve dynamic analysis techniques (functional and non-functional) and testing done by executing code. Validation is the process of evaluating the software after the completion of the development phase to determine whether the software meets the customer’s expectations and requirements. So, the V-Model contains Verification phases on one side and Validation phases on the other. The coding phase joins the Verification and Validation phases in a V-shape. Thus, it is called V-Model.

There are several Validation phases in the V-Model

1. Unit Testing

During the module design phase, developers develop Unit Test Cases.  Developers execute these Unit Test Cases to eliminate unit-level bugs.

2. Integration testing

After completing unit testing, we perform Integration testing. We integrate the modules in integration testing and test the integrated modules. We perform Integration testing in the Architecture design phase. This test verifies the communication of modules among themselves.

3. System Testing

System testing tests the complete application’s functionality, inter-dependency, and communication. It tries the functional and non-functional requirements of the developed application.

4. User Acceptance Testing (UAT)

The user performs UAT in a user environment that resembles the production environment. UAT verifies if the delivered system meets the user’s requirements and is ready for use in the real world.

Advantages of V-Model

  • V-Model is highly disciplined model where you proceed to next phase only when previous phase is completed.
  • Suitable for projects where the project requirements are precise.
  • This model focuses on verification and validation activities early in the life cycle, thereby enhancing the probability of building an error-free and good-quality product.
  • It enables project management to track progress accurately.
  • Emphasis on Testing: The V-Model strongly emphasizes testing, which helps ensure the software’s quality and reliability.
  • Improved Traceability: The V-Model provides a clear link between the requirements and the final product, making it easier to trace and manage changes to the software.
  • Better Communication: The V-Model’s precise structure helps improve communication between the customer and the development team.

Disadvantages of V-Model

  • High risk and uncertainty.
  • It is only suitable for projects where requirements are precise and contain a high risk of changing.
  • This model does not support the iteration of phases.
  • Inflexibility: The V-Model is a linear and sequential model, making it difficult to adapt to changing requirements or unexpected events.
  • Time-Consuming: The V-Model can be time-consuming, as it requires a lot of documentation and testing.