The seductive and dangerous V Model

There's no mention of exploratory testing. That's simply because my aim in writing the article was to help people understand the flaws of the V Model and how they can work around them in traditional environments that try to apply the model. A comparison of exploratory and traditional scripted testing techniques was too big a topic to be shoe-horned in here.
The Project Manager finishes the meeting by firing a question at the Programme Test Manager, and myself, the Project Test Manager.
"The steering board's asking questions about quality. Are we following a formal testing model?".
The Programme Test Manager doesn't hesitate. "We always use the V Model. It's the industry standard".
The Project Manager scribbles a note. "Good".
Fast forward four months, and I'm with the Programme Manager and the test analysts. It's a round table session, to boost morale and assure everyone that their hard work is appreciated.

The Programme Manager is upbeat. "Of course you all know about the problems we've been having, but when you look at the big picture, it's not so bad. We're only about 10% behind where we should have been. We're still on target to hit the implementation date."
This is a red rag to a bullish test manager, so I jump in. "Yes, but that 10% is all at the expense of the testing window. We've lost half our time".
The Programme Manager doesn't take offence, and laughs. "Oh, come on! You're not going to tell me you've not seen that before? If you're unhappy with that then maybe you're in the wrong job!".
I'm not in the mood to let it drop. "That doesn't make it right. There's always a readiness to accept testing getting squeezed, as if the test window is contingency. If project schedules and budgets overrun, project managers can't get away with saying 'oh - that always happens' ".
He smiles and moves smoothly on, whilst the test analysts try to look deadpan, and no doubt some decide that career progression to test management isn't quite as attractive as they used to think.
Test windows do get squeezed
The Programme Manager was quite right. That's what happens on Waterfall projects, and saying that you're using the V Model does nothing to stop that almost routine squeeze.
In "Testing Experience" issue 2, Dieter Arnouts [1] outlined how test management fits into different software development lifecycle models. I want to expand on the V Model, its problems and what testers can do in response.
In the earlier meeting the Programme Test Manager had given an honest and truthful answer, but I wonder if he was actually wholly misleading. Yes, we were using the V Model, and unquestionably it would be the "test model" of choice for most testing professionals, in the UK at least.
However, I question whether it truly qualifies as a "test model", and whether its status as best practice, or industry standard, is deserved.
A useful model has to represent the way that testing can and should be carried out. A model must therefore be coherent, reasonably precisely defined and grounded in the realities of software development.
Coherence at the expense of precision
If the V Model, as practised in the UK, has coherence it is at the expense of precision. Worldwide there are several different versions and interpretations. At one extreme is the German V-Model, [2], the official project management methodology of the German government. It is roughly equivalent to Prince-2, but more directly relevant to software development. Unquestionably this is coherent and rigorously defined.
Of course, it's not the V Model at all, not in the sense that UK testers understand it. For one thing the V stands not for the familiar V shaped lifecycle model, but for "vorgehens", German for "going forwards". However, this model does promote a V shaped lifecycle, and some seem to think that this is the real V Model, in its pure form.
The US also has a government standard V Model [3], which dates back about 20 years, like its German counterpart. Its scope is rather narrower, being a systems development lifecycle model, but still more far more detailed and more rigorous than most UK practitioners would understand by the V Model.
The understanding that most of us in the UK have of the V Model is probably based on the V Model as it's taught in the ISEB Foundation Certificate in Software Testing [4]. The syllabus merely describes the Model without providing an illustration, and does not even name the development levels on the left hand side of the V. Nor does it prescribe a set number of levels of testing. Four levels is "common", but there could be more or less on any project.
This makes sense to an experienced practitioner. It is certainly coherent, in that it is intuitive. It is easy for testers to understand, but it is far from precise. Novices have no trouble understanding the model to the level required for a straightforward multiple choice exam, but they can struggle to get to grips with what exactly the V Model is. If they search on the internet their confusion will deepen. Wikipedia is hopelessly confused on the matter, with two separate articles on the V Model, which fail to make a clear distinction between the German model [5] and the descriptive lifecycle model [6] familiar to testers. Unsurprisingly there are many queries on internet forums asking "what is the V Model?"
There are so many variations that in practice the V Model can mean just about whatever you want it to mean.
It is interesting to do a Google images search on "V Model". One can see a huge range of images illustrating the model. All share the V shape, and all show an arrow or line linking equivalent stages in each leg. However, the nature of the link is vague and inconsistent. Is it static testing of deliverables? Simple review and sign-off of specifications? Early test planning? Even the direction of the arrow varies. The Wikipedia article on the German V Model has the arrows going in different directions in different diagrams. There is no explanation for this. It simply reflects the confusion in the profession about what exactly the V Model is.
Boiled down to its most basic form, the V Model can mean simply that test planning should start early on, and the test plans should be based on the equivalent level of the left hand development leg. In practice, I fear that that is all it usually does mean.
The trouble is that this really isn't a worthwhile advance on the Waterfall Model. The V Model is no more than a testing variant of the Waterfall. At best, it is a form of damage limitation, mitigating some of the damage that the Waterfall has on testing. To understand the significance of this for the quality of applications we need to look at the history and defects of the Waterfall Model itself.
The Waterfall - a straw man, not a serious model
In 1970 Royce wrote the famous paper [7] depicting the Waterfall Model. It is a strange example of how perceptive and practical advice can be distorted and misapplied. Using the analogy of a waterfall, Royce set up a straw man model to describe how software developments had been managed in the 1960s. He then demolished the model. Unfortunately posterity has credited him with inventing the model
The Waterfall assumes that a project can be broken up into separate, linear phases and that the output of each phase provides the input for the next phase, thus implying that each would be largely complete before the next one would start. Although Royce did not make the point explicitly, his Waterfall assumes that requirements can, and must, be defined accurately at the first pass, before any significant progress has been made with the design. The problems with the Waterfall, as seen by Royce, are its inability to handle changes, mainly changes forced by test defects, and the inflexibility of the model in dealing with iteration. Further flaws were later identified, but Royce's criticisms are still valid.
Royce makes the point that prior to testing, all the stages of the project have predictable outputs, i.e. the results of rigorous analysis. The output of the testing stage is inherently unpredictable in the Waterfall, yet this is near the end of the project. Therefore, if the outcome of testing is not what was predicted or wanted, then reworks to earlier stages can wreck the project. The assumption that iteration can be safely restricted to successive stages doesn't hold. Such reworking could extend right back to the early stages of design, and is not a matter of polishing up the later steps of the previous phase.
Although Royce did not dwell on the difficulty of establishing the requirements accurately at the first pass, this problem did trouble other, later writers. They concluded that not only is it impossible in practice to define the requirements accurately before construction starts, it is wrong in principle because the process of developing the application changes the users' understanding of what is desirable and possible and thus changes the requirements. Furthermore, there is widespread agreement that the Waterfall is particularly damaging for interactive applications.
The problems of the Waterfall are therefore not because the analysts and developers have screwed up. The problems are inherent in the model. They are the result of following it properly, not badly!
The Waterfall and project management
So if the Waterfall was originally depicted as a straw man in 1970, and if it has been consistently savaged by academics, why is there still debate about it? Respected contemporary textbooks still defend it. Books such as Hallows' "Information Systems Project Management" [8], a valuable book, frequently used for university courses. The title gives the game away. The Waterfall was shaped by project management requirements, and it therefore facilitates project management. Along with the V model it is neater, and much easier to manage, plan and control than an iterative approach, which looks messy and unpredictable to the project manager.
Raccoon in 1997 [9] used a revealing phrase, describing the Waterfall.
"If the Waterfall model were wrong, we would stop arguing over it. Though the Waterfall model may not describe the whole truth, it describes an interesting structure that occurs in many well-defined projects and it will continue to describe this truth for a long time to come. I expect the Waterfall model will live on for the next one hundred years and more".
Note the key phrase "an interesting structure that occurs in many well-defined projects".
The Waterfall allows project managers to structure projects neatly, and it is good for project plans not applications!
It is often argued that in practice the Waterfall is not applied in its pure form; that there is always some limited iteration and that there is invariably some degree of overlap between the phases. Defenders of the model therefore argue that critics don't understand how it can be used effectively.
Hallows argues that changes are time-consuming and expensive regardless of the model followed. He dismisses the criticism that the Waterfall doesn't allow a return to an earlier stage by saying that this would be a case of an individual project manager being too inflexible, rather than a problem with the model.
This is naive. The problem is not solved by better project management, because project management itself has contributed towards the problem; or rather the response of rational project managers to the pressures facing them.
The dangerous influence of project management had been recognised by the early 1980s. Practitioners had always been contorting development practices to fit their project management model, a point argued forcibly by McCracken & Jackson in 1982 [10].
"Any form of life cycle is a project management structure imposed on system development. To contend that any life cycle scheme, even with variations, can be applied to all system development is either to fly in the face of reality or to assume a life cycle so rudimentary as to be vacuous."
In hindsight the tone of McCracken & Jackson's paper, and the lack of response to it for years is reminiscent of Old Testament prophets raging in the wilderness. They were right, but ignored.
The symbiosis between project management and the Waterfall has meant that practitioners have frequently been compelled to employ methods that they knew were ineffective. This is most graphically illustrated by the UK government's mandated use of the PRINCE2 project management method and SSADM development methodology. These two go hand in hand.
They are not necessarily flawed, and this article does not have room for their merits and problems, but they are associated with a traditional approach such as the Waterfall.
The UK's National Audit Office stated in 2003 [11] that "PRINCE requires a project to be organised into a number of discrete stages, each of which is expected to deliver end products which meet defined quality requirements. Progress to the next stage of the project depends on successfully meeting the delivery targets for the current stage. The methodology fits particularly well with the 'waterfall' approach."
The NAO says in the same paper that "the waterfall ... remains the preferred approach for developing systems where it is very important to get the specification exactly right (for example, in processes which are computationally complex or safety critical)". This is current advice. The public sector tends to be more risk averse than the private sector. If auditors say an approach is "preferred" then it would take a bold and confident project manager to reject that advice.
This official advice is offered in spite of the persistent criticism that it is never possible to define the requirements precisely in advance in the style assumed by the Waterfall model, and that attempting to do so is possible only if one is prepared to steamroller the users into accepting a system that doesn't satisfy their goals.
The UK government is therefore promoting the use of a project management method partly because it fits well with a lifecycle that is fundamentally flawed because it has been shaped by project management needs rather than those of software development.
The USA and commercial procurement
The history of the Waterfall in the USA illustrates its durability and provides a further insight into why it will survive for some time to come; its neat fit with commercial procurement practices.
The US military was the main customer for large-scale software development contracts in the 1970s and insisted on formal and rigorous development methods. The US Department of Defense (DoD) did not explicitly mandate the Waterfall, but their insistence in Standard DOD-STD-2167 [12] on a staged development approach, with a heavy up-front documentation overhead, and formal review and sign-off of all deliverables at the end of each stage, effectively ruled out any alternative. The reasons for this were quite explicitly to help the DoD to keep control of procurement.
In the 80s the DoD relaxed its requirements and allowed iterative developments. However, it did not forbid the Waterfall, and the Standard's continued insistence on formal reviews and audits that were clearly consistent with the Waterfall gave developers and contractors every incentive to stick with that model.
The damaging effects of this were clearly identified to the DoD at the time. A report of the Defense Science Board Task Force [13] criticised the effects of the former Standard, and complained that the reformed version did not go nearly far enough.
However, the Task Force had to acknowledge that "evolutionary development plays havoc with the customary forms of competitive procurement, ... and they with it."
The Task Force contained such illustrious experts as Frederick Brooks, Vic Basili and Barry Boehm. These were reputable insiders, part of a DoD Task Force, not iconoclastic academic rebels. They knew the problems caused by the Waterfall and they understood that the rigid structure of the model provided comfort and reassurance that large projects involving massive amounts of public money were under control. They therefore recommended appropriate remedies, involving early prototyping and staged awarding of contracts. They were ignored. Such was the grip of the Waterfall nearly 20 years after it had first been criticised by Royce.
The DoD did not finally abandon the Waterfall till Military Standard 498 (MIL-STD-498) seven years later in 1994, by which time the Waterfall was embedded in the very soul of the IT profession.
Even now the traditional procurement practices referred to by the Task Force, which fit much more comfortably with the Waterfall and the V Model, are being followed because they facilitate control, not quality. It is surely significant that the V Model is the only testing model that students of the Association of Chartered Certified Accountants learn about. It is the model for accountants and project managers, not developers or testers. The contractual relationship between client and supplier reinforces the rigid project management style of development.
Major George Newberry, a US Air Force officer specialising in software acquisition and responsible for collating USAF input to the defence standards, complained in 1995 [14] about the need to deliver mind-numbing amounts of documentation in US defence projects because of the existing standards.
"DOD-STD-2167A imposes formal reviews and audits that emphasize the Waterfall Model and are often nonproductive 'dog and pony shows'. The developer spends thousands of staff-hours preparing special materials for these meetings, and the acquirer is then swamped by information overload."
This is a scenario familiar to any IT professional who has worked on external contracts, especially in the public sector. Payments are tied to the formal reviews and dependent on the production of satisfactory documentation. The danger is that supplier staff become fixated on the production of the material that pays their wages, rather than the real substance of the project.
Nevertheless, as noted earlier, the UK public sector in particular, and large parts of the private sector are still wedded to the Waterfall method and this must surely bias contracts against a commitment to quality.
V for veneer?
What is seductive and damaging about the V Model is that it gives the Waterfall approach credibility. It has given a veneer of respectability to a process that almost guarantees shoddy quality. The most damaging aspect is perhaps the effect on usability.
The V Model discourages active user involvement in evaluating the design, and especially the interface, before the formal user acceptance testing stage. By then it is too late to make significant changes to the design. Usability problems can be dismissed as "cosmetic" and the users are pressured to accept a system that doesn't meet their needs. This is bad if it is an application for internal corporate users. It is potentially disastrous if it is a web application for customers.
None of this is new to academics or test consultants who've had to deal with usability problems. However, what practitioners do in the field can often lag many years behind what academics and specialist consultants know to be good practice. Many organisations are a long, long way from the leading edge.
Rex Black provided a fine metaphor for this quality problem in 2002 [15]. After correctly identifying that V Model projects are driven by cost and schedule constraints, rather than quality, Black argues that the resultant fixing of the implementation date effectively locks the top of the right leg of the V in place, while the pivot point at the bottom slips further to the right, thus creating Black's "ski slope and cliff".
The project glides down the ski slope, then crashes into the "quality cliff" of the test execution stages that have been compressed into an impossible timescale.
The Waterfall may have resulted in bad systems, but its massive saving grace for companies and governments alike was that they were developed in projects that offered at least the illusion of being manageable! This suggests, as Raccoon stated [9], that the Waterfall may yet survive another hundred years.
The V Model's great attractions were that it fitted beautifully into the structure of the Waterfall, it didn't challenge that model, and it just looks right; comfortable and reassuring.
What can testers do to limit the damage?
I believe strongly that iterative development techniques must be used wherever possible. However, such techniques are beyond the scope of this article. Here I am interested only in explaining why the V Model is defective, why it has such a grip on our profession, and what testers can do to limit its potential damage.
The key question is therefore; how can we improve matters when we find we have to use it? As so often in life just asking the question is half the battle. It's crucial that testers shift their mindset from an assumption that the V Model will guide them through to a successful implementation, and instead regard it as a flawed model with a succession of mantraps that must be avoided.
Testers must first accept the counter-intuitive truth that the Waterfall and V Model only work when their precepts are violated. This won't come as any great surprise to experienced practitioners, though it is a tough lesson for novices to learn.
Developers and testers may follow models and development lifecyles in theory, but often it's no more than lip service. When it comes to the crunch we all do whatever works and ditch the theory. So why not adopt techniques that work and stop pretending that the V Model does?
In particular, iteration happens anyway! Embrace it. The choice is between planning for iteration and frantically winging it, trying to squeeze in fixes and reworking of specifications.
Even the most rigid Waterfall project would allow some iteration during test execution. It is crucial that testers ensure there is no confusion between test cycles exercising different parts of the solution, and reruns of previous tests to see whether fixes have been applied. Testers must press for realistic allowances for reruns. One cycle to reveal defects and another to retest is planning for failure.
Once this debate has been held (and won!) with project management the tester should extend the argument. Make the point that test execution provides feedback about quality and risks. It cannot be right to defer feedback. Where it is possible to get feedback early it must be taken.
It's not the testers' job to get the quality right. It's not the testers' responsibility to decide if the application is fit to implement. It's our responsibility to ensure that the right people get accurate feedback about quality at the right time. That means feedback to analysts and designers early enough to let them fix problems quickly and cheaply. This feedback and correction effectively introduces iteration. Acknowledging this allows us to plan for it.
Defenders of the V Model would argue that that is entirely consistent with the V Model. Indeed it is. That is the point.
However, what the V Model doesn't do adequately is help testers to force the issue; to provide a statement of sound practice, an effective, practical model that will guide them to a happy conclusion. It is just too vague and wishy washy. In so far as the V Model means anything, it means to start test planning early, and to base your testing on documents from equivalent stages on the left hand side of the V.
Without these, the V Model is nothing. A fundamental flaw of the V Model is that it is not hooked into the construction stages in the way that its proponents blithely assume. Whoever heard of a development being delayed because a test manager had not been appointed?
"We'll just crack on", is the response to that problem. "Once we've got someone appointed they can catch up."
Are requirements ever nailed down accurately and completely before coding starts? In practice, no. The requirements keep evolving, and the design is forced to change. The requirements and design keep changing even as the deadline for the end of coding nears.
"Well, you can push back the delivery dates for the system test plan and the acceptance test plan. Don't say we're not sympathetic to the testers!"
What is not acknowledged is that if test planning doesn't start early, and if the solution is in a state of flux till the last moment, one is not left with a compromised version of the V Model. One is left with nothing whatsoever; no coherent test model.
Testing has become the frantic, last minute, ulcer inducing sprint it always was under the Waterfall and that the V Model is supposed to prevent.
It is therefore important that testers agitate for the adoption of a model that honours the good intentions of the V Model, but is better suited to the realties of development and the needs of the testers.
Herzlich's W Model
An interesting extension of the V Model is Paul Herzlich's W Model [16].
The W Model removes the vague and ambiguous lines linking the left and right legs of the V and replaces them with parallel testing activities, shadowing each of the development activities.
As the project moves down the left leg, the testers carry out static testing (i.e. inspections and walkthroughs) of the deliverables at each stage. Ideally prototyping and early usability testing would be included to test the system design of interactive systems at a time when it would be easy to solve problems. The emphasis would then switch to dynamic testing once the project moves into the integration leg.
There are several interesting aspects to the W Model. Firstly, it drops the arbitrary and unrealistic assumption that there should be a testing stage in the right leg for each development stage in the left leg. Each of the development stages has its testing shadow, within the same leg.
The illustration shows a typical example where there are the same number of stages in each leg, but it's possible to vary the number and the nature of the testing stages as circumstances require without violating the principles of the model.
Also, it explicitly does not require the test plan for each dynamic test stage to be based on the specification produced in the twin stage on the left hand side. There is no twin stage of course, but this does address one of the undesirable by-products of a common but unthinking adoption of the V Model; a blind insistence that test plans should be generated from these equivalent documents, and only from those documents.
A crucial advantage of the W Model is that it encourages testers to define tests that can be built into the project plan, and on which development activity will be dependent, thus making it harder for test execution to be squeezed at the end of the project.
However, starting formal test execution in parallel with the start of development must not mean token reviews and sign-offs of the documentation at the end of each stage. Commonly under the V Model, and the Waterfall, test managers receive specifications with the request to review and sign off within a few days what the developers hope is a completed document. In such circumstances test managers who detect flaws can be seen as obstructive rather than constructive. Such last minute "reviews" do not count as early testing.
Morton's Butterfly Model
Another variation on the V Model is the little known Butterfly Model [17] by Stephen Morton, which shares many features of the W Model.
The butterfly metaphor is based on the idea that clusters of testing are required throughout the development to tease out information about the requirements, design and build. These micro-iterations can be structured into the familiar testing stages, and the early static testing stages envisaged by the W Model.
In this model these micro-iterations explicitly shape the development during the progression down the development leg. In essence, each micro-iteration can be represented by a butterfly; the left wing for test analysis, the right wing for specification and design, and the body is test execution, the muscle that links and drives the test, which might consist of more than one piece of analysis and design, hence the segmented wings. Sadly, this model does not seem to have been fully fleshed out, and in spite of its attractions it has almost vanished from sight.
Conclusion - the role of education
The beauty of the W and Butterfly Models is that they fully recognise the flaws of the V Model, but they can be overlaid on the V. That allows the devious and imaginative test manager to smuggle a more helpful and relevant testing model into a project committed to the V Model without giving the impression that he or she is doing anything radical or disruptive.
The V Model is so vague that a test manager could argue with a straight face that the essential features of the W or Butterfly are actually features of the V Model as the test manager believes it must be applied in practice. I would regard this as constructive diplomacy rather than spinning a line!
I present the W and Butterfly Models as interesting possibilities but what really matters is that test managers understand the need to force planned iteration into the project schedule, and to hook testing activities into the project plan so that "testing early" becomes meaningful rather than a comforting and irrelevant platitude. It is possible for test managers to do any of this provided they understand the flaws of the V Model and how to improve matters. This takes us onto the matter of education.
The V Model was the only "model" testers learned about when they took the old ISEB Foundation Certificate. Too many testers regarded that as the end of their education in testing. They were able to secure good jobs or contracts with their existing knowledge. Spending more time and money continuing their learning was not a priority.
As a result of this, and the pressures of project management and procurement, the V Model is unchallenged as the state of the art for testing in the minds of many testers, project managers and business managers.
The V Model will not disappear just because practitioners become aware of its problems. However, a keen understanding of its limitations will give them a chance to anticipate these problems and produce higher quality applications.
I don't have a problem with testers attempting to extend their knowledge and skills through formal qualifications such as ISEB and ISTQB. However, it is desperately important that they don't think that what they learn from these courses comprises All You Ever Need to Know About The Only Path to True Testing. They're biased towards traditional techniques and don't pay sufficient attention to exploratory testing.
Ultimately we are all responsible for our own knowledge and skills; for our own education. We've got to go out there and find out what is possible, and to understand what's going on. Testers need to make sure they're aware of the work of testing experts such as Cem Kamer, James Bach, Brian Marick, Lisa Crispin and Michael Bolton. These people have put a huge amount of priceless material out on the internet for free. Go and find it!
References
[1] Arnouts, D. (2008). "Test management in different Software development life cycle models". "Testing Experience" magazine, issue 2, June 2008. Free subscription required. Accessed 21st July 2011.
[2] IABG. "Das V-Modell". Accessed 21st July 2011. This is in German, but there are links to English pages and a downloadable version of the full documentation in English.
[3] US Dept of Transportation, Federal Highway Administration. "Systems Engineering Guidebook for ITS". Accessed 25th July 2011.
[4] BCS ISEB Foundation Certificate in Software Testing - Syllabus (NB PDF download). Accessed 25th July 2011.
[5] Wikipedia. "V-Model". Accessed 25th July 2011.
[6] Wikipedia. "V-Model (software development)". Accessed 25th July 2011.
[7] Royce, W. (1970). "Managing the Development of Large Software Systems", IEEE Wescon, August 1970.
[8] Hallows, J. (2005). "Information Systems Project Management". 2nd edition. AMACOM, New York.
[9] Raccoon, L. (1997). "Fifty Years of Progress in Software Engineering". SIGSOFT Software Engineering Notes Vol 22, Issue 1 (Jan. 1997). pp88-104.
[10] McCracken, D., Jackson, M. (1982). "Life Cycle Concept Considered Harmful", ACM SIGSOFT Software Engineering Notes, Vol 7 No 2, April 1982. Subscription required. Accessed 25th July 2011.
[11] National Audit Office. (2003)."Review of System Development - Overview". Accessed 25th July 2011.
[12] Department of Defense Standard 2167 (DOD-STD-2167). (1975) "Defense System Software Development", US Government defence standard.
[13] "Defense Science Board Task Force On Military Software - Report" (extracts), (1987). ACM SIGAda Ada Letters Volume VIII , Issue 4 (July/Aug. 1988) pp35-46. Subscription required. Accessed 25th July 2011.
[14] Newberry, G. (1995). "Changes from DOD-STD-2167A to MIL-STD-498", Crosstalk - the Journal of Defense Software Engineering, April 1995. Accessed 25th July 2011. NB the original article is no longer available online on the Crosstalk archive, so the link is to a summary.
[15] Black, R. (2002). "Managing the Testing Process", p415. Wiley 2002.
[16] Herzlich, P. (1993). "The Politics of Testing". Proceedings of 1st EuroSTAR conference, London, Oct. 25-28, 1993.
[17] Morton, S. (2001). "The Butterfly Model for Test Development". Sticky Minds website. Accessed 25th July 2011.