The V-Model establishes a triangular relationship between requirement, its refinement and a corresponding validation which provides robustness to your development artifacts.
- Robustness with respect to change
Use the pattern when you have multiple levels of refinement and you anticipate changes.
The central element of the V-Model is the triangular relationship between requirement, it's refinement and a corresponding test. If you have just one level, then the refinement is the implementation. This gives you three relationships:
- The implementation realizes the requirement
- The test is based on the requirement
- The test validates the implementation
If your test fails, then there may be three reasons for it:
- The requirement could be faulty (e.g. ambiguous)
- The implementation could be faulty
- The test could test the wrong thing (e.g. not exactly what has been specified).
As every item is connected to the other two, this makes the structure robust against change.
The V-Model can extend over multiple levels, resulting in something like this:
The pattern has the following benefits and liabilities:
- Robustness against change
- Quality due to excellent test coverage
- Requires discipline in maintaining traceability
- Danger of stale data in the model (e.g. outdated test results)
- This pattern is extremely common in software development, where automated tests and continuous integration provide immediate feedback on the integrity of the system description.
- When using manual tests, you need a system that tracks outdated information for you.