CSE 270: Software Testing - Reading Material

Unit 1.3: Verification and Validation: Ensuring Software Excellence

Two intertwined concepts stand as sentinels of quality: verification and validation. These two processes play distinct yet complementary roles in the journey to create reliable and high-quality software applications. Verification ensures that the software is built correctly, adhering to specifications, while validation ensures that the right software is built, meeting user needs and expectations.

Verification: Are we building the software correctly?

Verification checks whether the software matches the written requirements and design documents.

Short version: Did we build the system the way we said we would?

Example (online banking):

A requirement states: "Lock a user's account after 3 failed login attempts."

Verification checks:

If the implementation matches the spec and tests pass, the feature is verified.

Common verification activities

Validation: Are we building the right software?

Validation checks whether the software solves the users' real problems and provides a good user experience.

Short version: Did we build the right system for the users?

Continuation of the banking example:

Even if the account locks after 3 failed attempts (verification passed), users might complain that:

Validation asks whether the behavior makes sense for users and supports their goals. If users are frustrated or unable to use the system effectively, validation fails.

Common validation activities

Quick comparison

VerificationValidation
Are we building the product correctly?Are we building the right product?
Checks against requirements & designChecks against user needs
Mostly developers & testersInvolves real users
Focus on technical correctnessFocus on usefulness & satisfaction
Example: "Does login lock after 3 failures?"Example: "Is the login experience user-friendly?"

The V-Model: An Elegant Representation of Verification and Validation

The V-Model, also known as the Validation and Verification Model, presents a visually intuitive representation of the testing process in relation to the development lifecycle. It illustrates the parallelism between the development stages and their corresponding testing phases. Just as development progresses in a linear manner, from requirements to coding and deployment, testing proceeds in a mirrored fashion, ensuring that each development phase is thoroughly validated.

In the V-Model, each development phase is paired with a corresponding testing phase. For instance:

The V-Model's symmetrical structure underscores the importance of validation at each step, affirming that the software's components and functionalities align with expectations and requirements. This methodology enhances the likelihood of identifying and rectifying defects early in the development process, saving time, effort, and costs.

Source: https://insights.sei.cmu.edu/blog/four-types-of-shift-left-testing/

The Shift-Left Movement and V & V

The shift-left movement in software development has significantly changed the approach to verification and validation (V&V) processes. Shift-left emphasizes the early integration of testing and quality assurance activities in the software development lifecycle, pushing them closer to the beginning of the development process. This shift has several key impacts on V&V:

Overall, the shift-left movement has transformed V&V practices from being isolated, end-stage activities to being integral components of the entire software development process. This results in higher-quality software, faster delivery, and increased collaboration among cross-functional teams. However, it requires a commitment to cultural change, new tooling, and automation to fully realize the benefits of this approach.

For more information about this important topic check out this blog by Donald Firesmith of Carnegie-Mellon University.

https://insights.sei.cmu.edu/blog/four-types-of-shift-left-testing/