DZone
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
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report

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 · Opinion
Like (4)
Save
Tweet
Share
7.40K 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

  • Chaos Engineering Tutorial: Comprehensive Guide With Best Practices
  • Solving the Kubernetes Security Puzzle
  • A Gentle Introduction to Kubernetes
  • Testing Level Dynamics: Achieving Confidence From Testing

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • 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: