article thumbnail

TDD and System Architecture

Net Objectives

When first adopting TDD, developers can run into some roadblocks that seem to indicate that TDD is a difficult process. In truth, some of these problems actually indicate faults in the system architecture.

article thumbnail

TDD Replicating Algorithms

Net Objectives

This feels like redundancy and makes them wonder if TDD is promoting bad practices. Example: A system that converts Fahrenheit to Celsius. The code would contain something like this: return (F - 32) * 5/9; The test might contain … Continue reading "TDD Replicating Algorithms".

Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

TDD and Encapsulation

Net Objectives

The type and nature of the tests that you write in TDD helps you to understand how strongly your system is encapsulated. Everything the system must do, and yet might not, needs a test. The more your tests are about … Continue reading "TDD and Encapsulation".

article thumbnail

TDD and Test Anatomy

Net Objectives

TDD, when conducted as a specifying activity, is an aspect of Behavior-Driven Development (BDD). Behavior is what we specify and is what we “drive” into the system using tests. Therefore, when structuring the tests in TDD we can be guided by the language of BDD: Given, When, Then.

article thumbnail

Sustainable TDD: Part 1

Net Objectives

TDD is typically part of an agile process. This means that we embrace change, that new requirements flow into the team’s work either on a time-boxed pulse, or through some kind of pull system (like Kanban). In TDD, a new requirement always starts out as a new, failing test or “specification.”

article thumbnail

TDD and Test Invariance

Net Objectives

TDD often uses unit tests to drive behavior into the system. When these are automated, this can give us clues as to how to make our work in TDD more reusable. Tools like Fit, Specflow, and Cucumber are all designed to parse some non-technical artifact (such … Continue reading "TDD and Test Invariance".

article thumbnail

“Good” Tests in TDD

Net Objectives

As consultants, we are often asked to review the work of others. One of the things we review is the quality of the design of some part of the system. Often the developers understand and agree that these qualities are important, but they are not … Continue reading "“Good” Tests in TDD".