DZone
DevOps Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > DevOps Zone > TDD and the Pressure to Create High-Quality Software

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?

Dave Farley user avatar by
Dave Farley
·
Feb. 05, 17 · DevOps Zone · Opinion
Like (4)
Save
Tweet
7.24K Views

Join the DZone community and get the full member experience.

Join For Free

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!

Software development

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

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 8 Must-Have Project Reports You Can Use Today
  • Biometric Authentication: Best Practices
  • Monolith vs Microservices Architecture: To Split or Not to Split?
  • The Power of Enum: Make Your Code More Readable and Efficient [Video]

Comments

DevOps Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo