A look at whether modern practices prefer Unit Tests or UML


When  talking about modern software development practices we first have to address the over arching software development methodologies.

From the early days of software development teams used primarily used the traditional model, lengthy planning, analysing, designing, implementation and testing.

Waterfall model, to modern usages of agile like methodologies, we can place methodologies into two categories:

plan-driven/traditional or heavyweight(Waterfall, Spiral and

agile or lightweight(Xp, Scrum)  [11]

In “Agile and Iterative Development: A Manager’s Guide”[12], author Larman states that in one a study of 1,027 IT projects in the United Kingdom,  Study reported that “scope management related to attempting waterfall practices was the single largest contributing factor for failure.” A damming study on the effectiveness of the traditional model, hence why modern software team tend to use an agile approach to development.

Agile methodologies are most often being used in recent times, we can look at a few popular types of methodologies to see how they incorporate testing and UML designs in their core principles.

The Agile manifesto which from a group of authors from the likes of Kent Beck, Martin Fowler, ( see agilemanifesto.org) states “Working software over Comprehensive documentation” this principle means that there is less emphasis on documentations such as UML. While admittedly this states less documentation and not none, it does imply using less documentation than what was seen in traditional models such as Waterfall.

Agile methodologies such as Extreme Programming (XP) promote refactoring[6] which in turn promote the use of Unit testing. Martin fowler coined the term Red Green Refactor, programmers should as part of an Iterative phase should refactored their code. If you have unit tests in place a developer can have more confidence that the code will continue to function as expected after refactor has taken place(reference Martin Fowler refactoring). In addition, a test driven development mindset is encouraged [7], whereas UML is not part of the 12 Key practices, even in the planning phase[7.1] users stores are preferred of a UML diagram such as use case

In a large survey done by Analysis.net Research[10], “State of Agile” found that of the 3,501 respondents, 72% used Unit testing. In the survey there’s no mention of UML, I can only speculate with 66% using some form of Scrum that UML diagrams were not being used. This survey does highlight that the majority see Unit Testing an important practice.

On the other side of the coin, a survey done on UML in the paper UML in practice,

“A survey of 226 developers conducted in 2002 by BZ Research [27] found that “In fact, only about one-third of developers recently surveyed said they use UML – and not a single respondent believes that code generated from models is production-ready.” In the same paper, a study conducted over 2 years found that out of the 50 developers interviewed, 35 did not use any form of UML, and the rest of 15 interviewed reported to only rarely using it. The developers interviewed stated various reasons for this, first issue was that they believed UML provides a lack of context as the diagrams describe “software architecture rather than the ‘whole’ system”. Secondly they believed that there’s too much overhead in understanding UML notation. This made it difficult for various different stakeholders to effectively communicate with one and another using UML. 

Looking at Google search  trends in the past 10 years, using the keywords “UML” and “Unit test”, we can compare the level of interest between the two.  While this is not conclusive evidence it does demonstrate an idea the interest level of both practices in the past decade. As we can see that UML search have decrease while unit test has largely stay the same if not increased.

I wanted to also analyse tech startups, having found out that tech Startups have risen in popularity in recent years [9], the majority of these startups are quick to market with a minimal viable product (MVP) I can only merely postulate that the majority of lean startups do not use UMLs due to importance place on being quick to market. At the same time this doesn’t prove they employ unit testing techniques


My opinion is that unit tests are preferred to UML is based on the assumption that over the years the adoption of UML has decreased while the use of agile methodologies have increased. Most agile methodologies have unit testing as part of their core principles. These practices advise refactoring the codebase, in addition to having less documentation due requirements constantly changing thus making UML documentation an expensive overhead in terms of time and resource.  These methodologies recommend an iterative approach whereby code is constant improved and refactored, this can be more easily achieve when unit tests are at the core of your system development’s process.

I believe unit testing is an essential part of any project, not necessarily taking a TDD approach but having tests that ensures the system accomplishes what it set out to achieve, whereas UML  lose their usefulness due to business requirement  changing constantly which plagues most system projects.



[1]Scaling Software Agility: Best Practices for Large Enterprises

[2]K. Schwaber and M. Beedle, Agile Software

[3]Development with SCRUM: Prentice-Hall, 2002.

[4]Agile Governance and Audit (chapter 1: agile Manifesto

[5]Scaling Software Agility: Best Practices for Large Enterprises (chapter 2:Why the Waterfall Model Doesn’t Work

[6] http://www.jera.com/techinfo/xpfaq.html

[7] FOOD Unit 5, coding in xp “code the unit test first, before you write the code to do the job”

[7.1] FOOD Unit 5 12 XP Key Practices The Planning Game

[8]Petre, Marian (2013). UML in practice. In: 35th International Conference on Software Engineering (ICSE 2013), 18-26 May 2013, San Francisco, CA, USA (forthcoming), pp. 722–731.

[9] http://www.investopedia.com/articles/investing/022815/1-country-tech-startups-usa.asp

[10] State of agile http://www.versionone.com/pdf/2013-state-of-agile-survey.pdf

[11]Suitability of Modern Software Development Methodologies for Model Driven Development

[12]Craig Larman (2003)  Agile and Iterative Development: A Manager’s Guide


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s