article thumbnail

TDD is not about testing

Xebia

Test-driven development (TDD) has been around for more than 20 years. Many people think of TDD as a methodology for testing because of its name. If you dislike testing, why would you bother with TDD? TDD is not about testing at all. TDD is about design and early feedback.

TDD 130
article thumbnail

TDD is not about testing

Xebia

Test-driven development (TDD) has been around for more than 20 years. Many people think of TDD as a methodology for testing because of its name. If you dislike testing, why would you bother with TDD? TDD is not about testing at all. TDD is about design and early feedback.

TDD 130
Insiders

Sign Up for our Newsletter

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

article thumbnail

The Economics of TDD

Dzone - DevOps

From a management standpoint, Test-Driven Development (TDD) can be a difficult sell. Tempting as it is to cut testing in order to reach the next milestone in the project, it is a mistake because, as we’ll see, TDD can help us accelerate development and reduce costs over a project’s lifecycle.

TDD 98
article thumbnail

When TDD Is Not a Good Fit

Henrik Warne

I like to use Test-Driven Development (TDD) when coding. However, in some circumstances, TDD is more of a hinderance than a help. Last week, I came across examples of where I developed new functionality without using TDD. Even though the tests were added later, the TDD mindset is still helpful. In other cases, TDD works as intended – the tests drive the design. In this case, TDD worked really well.

TDD 170
article thumbnail

Team Leadership in the Age of Agile

Speaker: Roy Osherove, Technology and Leadership Consultant

To do this, you've learned a wide variety of techniques and methodologies - SCRUM, Kanban, TDD, DevOps, self-organized teams, and much more.

article thumbnail

Practice TDD with Cyber-Dojo

Agile Alliance

In this lightning talk, Seb Rose introduces Cyber-Dojo, a free, open source, online training environment for people who want to get better at TDD. Technology tdd

TDD 101
article thumbnail

TDD mistakes 2

Habitable Code

Back in 2014 I wrote a blog post listing three mistakes often made by folks who are new to test-driven development (TDD). We’re doing TDD, but we have no code to test; we have nothing to hang our first test on, so we need to invent something, fast!

TDD 52
article thumbnail

TDD, Unit Testing and the Mainframe

DevOps.com

The post TDD, Unit Testing and the Mainframe appeared first on DevOps.com. DevOps at IBM automated unit testing code coverage IBM Z IBM Z Open Unit Test mainframe mainframe testing TDD test-driven developmentUnit testing is like exercise: Companies know it’s good for you and you should do it, but given their druthers, they’d rather avoid the effort and just get to the benefit. I wish I could say it’s otherwise.

TDD 70
article thumbnail

What Is TDD?

Net Objectives

I am heartened by the surge in TDD training. To me TDD is the 2nd most important thing for devs to learn-ATDD being the 1st TDD’s not just the automation of unit testing. TDD’s formulation of tests, prior to code, drives design. High quality code is easy … Continue reading "What Is TDD?". Emergent Design TDD Technical Agility

TDD 40
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. For example, developers will struggle to write unit tests of behavior that is embedded in a user interface, or in stored procedures … Continue reading "TDD and System Architecture". Audio Available TDDIn truth, some of these problems actually indicate faults in the system architecture.

TDD 40
article thumbnail

TDD and Reported Defects

Net Objectives

TDD views this very differently. In TDD, a “defect” is code that … Continue reading "TDD and Reported Defects". Audio Available TDDMost organizations have some type of reporting mechanism allowing customers to alert them to defects they have encountered. Typically, a “trouble ticket” or similar artifact is generated, and someone is assigned the task to 1) locate and then 2) fix the errant code.

TDD 40
article thumbnail

TDD: Three easy mistakes

Habitable Code

Back in 2014 I wrote a blog post listing three mistakes often made by folks who are new to test-driven development (TDD). Each time I visit a team that is relatively new to TDD I find the same basic mistakes cropping up every time.

TDD 52
article thumbnail

TDD mistakes 3

Habitable Code

Back in 2014 I wrote a blog post listing three mistakes often made by folks who are new to test-driven development (TDD). It is also not TDD. The three mistakes I identified are: Starting with error cases or null cases. Writing tests for invented requirements.

TDD 52
article thumbnail

TDD and Legacy Code

Net Objectives

TDD is a powerful way to develop new code. In his excellent book, Working Effectively with Legacy Code, Michael Feathers outlines techniques … Continue reading "TDD and Legacy Code". Audio Available TDDHowever, most organizations have significant existing code that was not developed this way. This “legacy code” is often difficult to test because it was not designed to be testable in the first place.

TDD 40
article thumbnail

Sustainable TDD: Part 1

Net Objectives

TDD is typically part of an agile process. In TDD, a new requirement always starts out as a new, failing test or “specification.” We write the test … Continue reading "Sustainable TDD: Part 1". Audio Available TDDThis 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).

TDD 40
article thumbnail

Sustainable TDD: Part 3

Net Objectives

TDD depends on a strong connection between the automation of the test suite and the system itself. So, if errors creep into the test … Continue reading "Sustainable TDD: Part 3". Audio Available TDDThe suite should record the specification that is implemented in the system, and the connection allows this to be confirmed at any point. The problem is automated tests pass by default.

TDD 40
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". Audio Available TDDHowever, sometimes acceptance tests are used to do this.

TDD 40
article thumbnail

Sustainable TDD: Part 2

Net Objectives

So, when the team adopts TDD, it is understandable that attention is paid to the level of resource needed to sustain it over time. It’s not uncommon for project managers to notice, as the project grows, that the … Continue reading "Sustainable TDD: Part 2". Project managers have to balance resources. Spending them on one thing means not spending them on another.

TDD 40
article thumbnail

TDD and Guard Assertions

Net Objectives

In TDD, tests take actions such as Setup, Trigger, and Verify. For example, If … Continue reading "TDD and Guard Assertions". Audio Available TDDEach of these pieces must successfully execute in order for the specification to be verified as accurate to the current behavior of the system. If there is an external dependency, the test can become vulnerable to a failure of that entity.

TDD 40
article thumbnail

TDD and Test Anatomy

Net Objectives

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

TDD 40
article thumbnail

TDD Replicating Algorithms

Net Objectives

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

TDD 40
article thumbnail

TDD Yields Velocity

Net Objectives

When TDD was first suggested, there were many who were dubious about the wisdom of having developers write tests of their own code. Give someone more … Continue reading "TDD Yields Velocity". Audio Available TDDAmong the objections raised was that developers will slow down if you burden them with new tasks, namely writing the tests as well as the code. This seems logical.

TDD 40
article thumbnail

TDD Yields Confidence

Net Objectives

TDD is a process that provides constant confirmation to the development team. The … Continue reading "TDD Yields Confidence". Audio Available TDDWriting the tests up-front confirms that there is sufficient understanding of requirements so that they can be expressed in the rigorous form of a unit test. Alternately, it reveals that this understanding has gaps and reveals questions that need to be answered.

TDD 40
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. The more your tests are about … Continue reading "TDD and Encapsulation". Everything the system must do, and yet might not, needs a test. Here, “must do” comes from your stakeholders’ requirements, and is therefore connected to business value.

TDD 40
article thumbnail

The Real Reasons for Doing Test-Driven Development ??

Xebia

Why do people apply TDD? What Are the Real Reasons for Doing TDD? Test-Driven Development (TDD) is a controversial topic amongst developers. After many years of doing TDD daily, I think part of the reason is that some people do not fully grasp the reasons behind TDD.

article thumbnail

TDD: Keeping Tests Green

Net Objectives

Ideally in TDD, no more than one test is ever failing at any given point in time. We want the suite to get back to “all green” as quickly … Continue reading "TDD: Keeping Tests Green". Audio Available TDDThis test represents the work that is about to be done but hasn’t yet. Also, this test should not spend a long time in the red.

TDD 40
article thumbnail

TDD: primitive obsession ( part 3 )

Apiumhub

Last month we talked about TDD example in software development ( part 1 ) and TDD first cycle ( part 2 ). In this new TDD and primitive obsession article, we will focus on removing duplication and reinforcing the constructors of our entities, something key to have a robust system. TDD: primitive obsession. We enter the phase of Refactor, in this phase we not only remove duplication, we also design our application within this space that TDD provides us.

TDD 67
article thumbnail

Specifying Constants in TDD

Net Objectives

TDD is different from QA in many respects. The government will dictate how quickly a … Continue reading "Specifying Constants in TDD". Audio Available TDDPart of this involves the tests we choose to write. A case in point is the specification of public constants. Example. When businesses buy assets, they can write-off (amortize) the value of those assets over time, as a taxation issue.

TDD 40
article thumbnail

TDD and Design Patterns

Net Objectives

Similarly, TDD was first promoted around the same time in history as part of eXtreme Programming. Some have suggested that these two points of view stand in opposition to each other, saying Design patterns are about up-front design, while … Continue reading "TDD and Design Patterns". Audio Available Design Patterns TDDDesign patterns in software came from the work of the Gang of Four in the mid-1990’s.

TDD 40
article thumbnail

Refactoring Applied to TDD

Net Objectives

Since TDD focuses on driving new behavior from tests, how would refactoring play … Continue reading "Refactoring Applied to TDD". Audio Available Refactoring TDD“Refactoring” refers to the discipline of improving the design of existing code without changing its behavior. It is usually thought of as a way to deal with old legacy code that is functional but poorly designed and thus hard to work with.

TDD 40
article thumbnail

Specifying Exceptions in TDD

Net Objectives

When an exception is declared in … Continue reading "Specifying Exceptions in TDD". Audio Available TDDExceptions in software represent a mechanism for raising an alarm when something goes wrong. They are used when there is a potential problem that cannot be detected by the compiler, linker, or other automated aspect of the development process, and thus may potentially make it into the released product.

TDD 40
article thumbnail

Announcing the TDD Companion

Net Objectives

I have just posted the sixtieth entry in this series and this seemed like enough content to gather into a sort … Continue reading "Announcing the TDD Companion". Audio Available TDDFor the last few month, I have been posting several times a week on what I hope are interesting topics relating to aspects of Test-Driven Development. Many people have commented positively on this work.

TDD 40
article thumbnail

TDD and Inflection Points

Net Objectives

As our industry matures it becomes increasingly true that we don’t need to re-invent the wheel For example, if code is written that is required to send data over a TCP-IP connection in, say, C#, the tendency is for … Continue reading "TDD and Inflection Points". Audio Available TDDSoftware is quite often implemented in the context of reusable frameworks and other preexisting, valuable entities.

TDD 40
article thumbnail

Commonly Missing Tests in TDD

Net Objectives

Because TDD is “test” driven development, people tend to think of TDD as “writing tests first.” In fact, TDD is not a testing activity per se. Because of this … Continue reading "Commonly Missing Tests in TDD". Audio Available TDDIt is the creation of an executable specification prior to the creation of each system element. Unit tests are a very useful by-product of this process.

TDD 40
article thumbnail

“Good” Tests in TDD

Net Objectives

Often the developers understand and agree that these qualities are important, but they are not … Continue reading "“Good” Tests in TDD". Audio Available Design Patterns Emergent Design TDDAs 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. Is it cohesive, decoupled, non-redundant, encapsulated, open-closed, and so forth?

TDD 40
article thumbnail

TDD First Cycle ( part 2)

Apiumhub

Let’s continue with our series of TDD articles, in the first part we looked at the theory behind the TDD and Unit Testing. In this second part, TDD First Cycle , we begin to develop our application, an application of notes where a user can write notes and everything that comes to our mind. TDD First Cycle. We always have to have in mind the TDD cycle. Okay, we already have a test in red as TDD First Cycle indicates: RED.

TDD 56
article thumbnail

TDD and the OCP

Net Objectives

This means that a “good” design will allow for a new behavior to be added to a system without having to change the existing code, or at least to minimize … Continue reading "TDD and the OCP". Audio Available TDDThe Open-Closed Principle (Bertrand Myers, Ivar Jacobsen) states, “Software entities (such as classes, modules, and functions) should be open for extension, but closed for modification.”

TDD 40
article thumbnail

TDD and Code Coverage

Net Objectives

Measurement tools are used as a process gate, where the team must achieve this minimum coverage level before code can be checked … Continue reading "TDD and Code Coverage". Audio Available TDDIt’s not unusual these days for development organizations to adopt a code coverage requirement. This is usually expressed as a percentage: at least X% of all code developed must be covered by tests.

TDD 40
article thumbnail

TDD and Code Coverage Tools

Net Objectives

In TDD and Code Coverage, we established that code coverage tools do not provide useful project metrics, in and of themselves. In TDD, we don’t use code coverage tools for this purpose because we don’t need to. Continue reading "TDD and Code Coverage Tools". Audio Available TDDIf all production code is written to satisfy prewritten, failing tests, then by definition, all code is covered.

TDD 40
article thumbnail

From TDD to PBT via Kotest

Dzone - DevOps

In this post, we see how to integrate PBT into your Kotlin tests. Introduction. I’ve been a big fan of Property Based Testing for a number of years, based on my experiences with ScalaCheck. It’s always been an annoyance that Kotlin did not support this testing style, at least to the same extent.

TDD 115