Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

TDD and the Pressure to Create High-Quality Software

DZone's Guide to

TDD and the Pressure to Create High-Quality Software

The qualities of testable code are pretty much the same qualities of high-quality software. What does TDD have to do with this?

· DevOps Zone
Free Resource

Download the blueprint that can take a company of any maturity level all the way up to enterprise-scale continuous delivery using a combination of Automic Release Automation, Automic’s 20+ years of business automation experience, and the proven tools and practices the company is already leveraging.

Before test-driven development (TDD), the only thing that applied pressure for high-quality in software development was the knowledge, experience, and commitment of an individual software developer.

After TDD, there was something else.

High quality in software is widely agreed to include the following properties.

High-quality software:

  • Is modular.
  • Is loosely-coupled.
  • Has high cohesion.
  • Has a good separation of concerns.
  • Exhibits information hiding.

Test-driven development is only partially about testing. Of much greater importance is its impact on design.

Test-driven development is development (design) driven by tests. In test-driven development, we write the test before writing code to make the test pass. This is distinct from unit testing. TDD is much more than “good unit testing.”

Writing the test first is important. It means that we always end up with “testable” code.

What makes code testable? Testable code:

  • Is modular.
  • Is loosely-coupled.
  • Has high cohesion.
  • Has a good separation of concerns.
  • Exhibits information hiding.

These are precisely the same properties as those of high-quality code. So, with the introduction of TDD, we now have something else beyond the knowledge, experience, and commitment of a programmer to push us in the direction of high quality. Cool!

Download the ‘Practical Blueprint to Continuous Delivery’ to learn how Automic Release Automation can help you begin or continue your company’s digital transformation.

Topics:
software testing ,tdd ,code quality ,devops

Published at DZone with permission of Dave Farley, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}