The V-model is also known as the Verification & Validation model. It is a model where processes are executed sequentially in V-shape. V-Model is based on linkage of a testing phase for each corresponding development stage. In other words, for every single phase, there is a direct associate testing phase in the development cycle. This model is an extension of the waterfall model and is an extremely disciplined model. Only when the previous phase completes, the next phase starts.
How V-Model Came into Existence?
The testing in the Waterfall model starts only after the implementation phase. While working in large projects with complex systems, most of the times the requirement phase missed the key details, hence producing a wrong product. Also, sometimes the design produced had serious mistakes in architecture, thus leading to re-designing of the software. From several projects, it was observed that defects were found during the requirement and design phase. This also led to an increase in the cost of fixing a defect across the development lifecycle because the defects were detected late.
To address the entire problem, the V-model of testing came into existence. Let us now understand the design of the V-model.
Under V-Model, all the testing phase of each development stage is planned in parallel. So, on one side there are Validation phases and on the other side, there are Verification phases. The two sides intersect at the Coding phase, forming the V-shape.
Let us understand the different phases of the V-model.
The different Verification phases are discussed below –
1. Business Requirement Analysis
Business requirement analysis is the 1st phase of the development cycle. In this phase, the product requirements are understood from the customer perspective. To understand the customers’ exact requirements and expectations, this phase involves detailed communication with the customer. This activity is essential and needs to be done carefully because most of the customers aren’t clear about their requirements. These business requirements are used as an input for acceptance testing and later on used as acceptance test design planning.
2. System Design
After having detailed and clear requirements, in this phase complete system is designed. This phase involves understanding and detailing the entire hardware and communication setup for the product (under development). Based on the system design, expertise creates the entire. This phase, if completed, leaves us with more time for the actual test execution.
3. Architectural Design
This phase involves understanding the architectural specification and design. Based on the proposed technical approach and financial feasibility, the final decision is made. The system design is divided into different modules which perform different functions. This is termed as High-Level Design (HLD). This phase involves understanding and clarification of the data transfer and communication between the internal modules and the outside world other systems. Also, this phase involves the designing and documentation of the integration tests.
4. Module Design
This phase specifies the detailed internal design for all the system modules, termed as Low-Level Design (LLD). The design should be compatible with the other system modules in the system architecture and other external systems. Based on the design of the internal module, this phase also involves a unit test. Unit tests are an important part of any development process as it eliminates the maximum faults and errors at an initial stage.
5. Coding Phase
The coding phase involves the actual coding of the system module. The selection of the programming language is dependent on the system and architectural requirements. As per the coding guidelines and standards, the coding is performed. The code goes through several code reviews. The optimisation of code is important before arriving at the final decision.
1. Unit Testing
During this validation phase, the designed unit test in the module design is executed. Unit testing eliminates bugs at the initial stage.
2. Integration Testing
This phase is linked to the architectural design phase. Integration testing consists of testing the coexistence and communication of the internal module of the system.
3. Acceptance Testing
Acceptance testing is linked with the business requirement analysis phase. This testing involves testing the product in the user environment. It solves the compatibility issue with the other systems available in the user environment. It also uncovers the non-functional issues like performance and load defects in the actual user environment.
Principles of V-Model
1. Process or Data Integrity
This principle of V-model says that to achieve a successful design of any project, incorporation and cohesion of both processes and data is necessary. Identification of process elements is important at every requirement.
2. Large to Small
V-model performs the testing in hierarchical aspect. This principle defines the process with more refined details as the process moves from the requirement phase to the design phase.
3. Cross Referencing
The direct correlation between the client requirements and the testing activity for the respective requirement defines Cross-Referencing.
This is one of the principles which states that the V-model is flexible enough to accommodate IT project of any size, duration and complexity.
5. Concrete Documentation
This principle states that documenting every project is necessary. The project development, as well as the support team, should do the documentation.
When to Use V-Model?
When the project is small, they use the V-model. Also, when the project requirements are clear, fixed and defined. The V-shaped model should be chosen when sufficient technical resources are available with high technical expertise.
- Easy to understand and apply.
- Simple model
- Easy to manage
- Each phase has specific deliverables and a review process
- Highly disciplined model
- Works well for smaller projects
- Detects defects at an early stage
- Not flexible to changes, therefore expensive to make the changes
- High risk and uncertainty
- Not good for complex and object-oriented projects
- Not suitable for high-risk projects
- No production of early prototypes
- Lacks adaptability
- Has timeline restrictions
This article talks about how V-model has solved the problem faced in the Waterfall Model. Also, this article talks about the design of the V-model along with its principle, pros and cons.