June 4th, 2015 by inflectra
Test-Driven Development (TDD) was created originally as part of the Extreme Programming (XP) methodology, where it was known as the ‘Test-First’ concept. When using TDD, developers write unit tests before the code is written which helps flesh out the requirements detail; detail that can then be used to produce a better solution. You can read a more detailed description of TDD here.
Figure 1: General flow using TDD
There has recently been an outbreak of criticism of TDD, to the point where some have claimed that TDD is dead! Is this a real reflection of trends in testing practice, or noise intended to draw attention? It seems that those sounding the death knell for TDD do so by using such a rigid definition of TDD that it becomes so narrowly applicable as to be almost useless. Having lost its usefulness, it can be declared dead.
This is the problem with ideas that begin as useful concepts but are then slowly strangled by those who would have those ideas defined and specified down to the last atom. Agile principles are simply not like that. Agile ideals encourage adaptability, change and choice. The claim of the TDD demise also comes with the idea that we are either writing test-first software or we are not.
Why does it have to be so black and white? Why can’t we do test-driven development where it works and use other methods where it does not, all at the same time? When we travel from A to B, we don’t stick to just one method of transport, even if we love cars. Sometimes we walk, sometimes we fly and yes, sometimes we will drive. It should be the same with software development; we need to get from A to B and we shouldn’t limit ourselves by saying that we must only use one method to get there.
Many aspects of software cannot be tested using more code anyway! Somebody recently told me, “Just because there are exceptions in which this won’t work, doesn’t mean we shouldn’t gain the benefit from those times that it will.” TDD does not preclude the need for other types of testing and we can take our pick as to which we use; user acceptance testing, stress testing, code reviews and of course, manual & exploratory testing, are all examples from a much longer list.
The claim has been made that serious investment in TDD leads to the neglecting of system or acceptance testing. This is like saying that manufacturers shouldn’t put automatic breaks on cars because drivers won’t bother to apply the manual brakes themselves. Quite ridiculous! We can lessen the risk if we realize that TDD is not purely a testing method, it is a development method; it is an aid for developers to help them develop a greater understanding of the requirements and then be sure that at the most granular level, those requirements are met. Thinking of TDD as a development method ensures that we have an independent and comprehensive testing philosophy. Perhaps we wouldn’t be having this discussion if the TDD had been called something different, such as Demonstration Driven Development; the ‘3D’ method.
Figure 2: Separating Coding from Testing
If TDD was working for us at one time, and now it is not, (although I’m not saying this is the case) something has changed. Rather than throw out the baby with the bathwater, why not put some effort into understanding what has changed and correcting it? Perhaps we’ve simply forgotten the original spirit of TDD and need to find our way back. But from looking at the debate from both sides, I can only conclude that it’s really just a lot of noise about something that generally is working well.
You may also be interested in:
Test-Driven Development
How to Choose a Test Management Tool
Test Cases Can be Used as Requirements
The Defect-Requirements-Test Triangle
Ask an Inflectra expert:
And if you have any questions, please email or call us at +1 (202) 558-6885
SpiraTest combines test management, requirements traceability & bug-tracking
SpiraTeam brings your teams together, managing the entire application lifecycle
SpiraPlan lets you manage your programs and portfolio of projects like never before
Orchestrates your automated regression testing, functional, load and performance
The ultimate test automation platform for web, mobile, and desktop applications
The help desk system, designed specifically for software support teams
Cloud hosted, secure source code management - Git and Subversion
Exploratory testing capture tool that automatically records your testing activity
Let us deal with the IT pain so you don't have to. Or use on-premise if you prefer.
Our customers work in every industry imaginable. From financial services to healthcare and biotech to government and defense and more, we work with our customers to address their specific needs.
Our products do not enforce a methodology on you, instead they let you work your way. Whether you work in agile development, Scrum, XP, Kanban and Lean, Waterfall, hybrid, or Scaled Agile Inflectra can help.
If you want to learn more about application delivery, testing, and more take a look at our whitepapers, videos, background papers, blog, and presentations.
Our suite of Accelerators speed up your deployment and adoption of our products, increasing your return on investment and reducing the cost of ownership.
We collaborate with a wide range of organizations to bring our customers a range of services (including load testing, training, and consulting), complimentary technologies, and specialized tools for specific industries.
Learn how different organizations have benefited from using Inflectra products to manage their software testing and application develooment.
Outstanding support is the foundation of our company. We make support a priority over all other work. Take a look at our support policy.
Discover great tips, discussions, and technical solutions from fellow customers and Inflectra's technical experts.
If you can't find the answer you're looking for, please get in touch with us: over email, phone, or online.
We are constantly creating new videos to help customers learn about our products, including through in depth webinars, all freely available along with a wide selection of presentations.
We provide a number of resources to help customers learn how to get the most out of our products, with free online resources, virtual classrooms, and face to face.
Read about Inflectra, our manifesto, and values. Meet our incredible customers who are building awesome things, and our leadership team that are committed to building a great company.
The Inflectra Blog contains articles on all aspects of the software lifecycle.
In addition we have whitepapers,
background articles, videos and
presentations to help get you started.
Events are a big part of our awesome customer service. They are a chance to learn more about us, our products, and how to level up your skills with our tools.
We partner with educational institutions and individuals all over the world. We are also a great place to work and encourage you to explore joining our team.
Please contact us with your questions, feedback, comments, or suggestions. We'll get back to you as soon as possible.
When you need additional assistance (be it training, consulting, or integration services) our global certified solution provider partner network is ready to help.
At Inflectra, we are fully committed to provide our customers with the very best products and customer service. Check out some of our recent awards.
We want to help developers extend and customize our tools to fit in with their needs. We provide robust APIs, sample code, and open source projects.