Joseph Yoder

avatar

What is Pragmatic TDD?

by Joseph Yoder on January 11, 2012 · 0 comments

by Joseph Yoder & Rebecca Wirfs-Brock

What do we mean by Pragmatic TDD?

Pragmatic Test Driven Development (TDD) is a practical approach to testing that focuses on the bigger picture of how testing best fits into and enhances your team’s software development practices. Rather than insisting that developers only write a lot of unit tests, you need to find a testing strategy that gives you higher quality software. You need to determine how testing best fits into your development context with your developers for your kind of software.

The typical approach to TDD usually focuses on having developers write many unit tests that may or may not add value. Instead, we recommend you adopt a testing strategy that gives you the most leverage. So, for example, rather than merely writing many unit tests, you can often get more value by defining the appropriate user-level acceptance tests. Testing should drive your development (but not at the expense of every other coding and design practice). One size or one approach for testing does not fit every organization or team.

One thing that has discouraged people from incorporating TDD into their organization is the common misperceptions that tests should always be written first, before writing any production code, and, that tests and code should be developed in many tiny increments. We believe that TDD is more about thinking carefully about how best to validate that your software meets your requirements. Testing and validation should drive your development process (that’s why we are fans of being Test Driven), but we think there is so much more to testing than writing lots of unit tests.

What do we mean by different testing rhythms?

We believe that you should pay attention to testing and that it should be an integral part of your daily programming practice. But we don’t insist that you always evolve tests along with your code in many short cycles. Some find it more natural to outline some tests first, and use those test scenarios to guide them as they write code. Once they’ve completed a “good enough” implementation that supports the test scenarios, they then write those tests and incrementally fix any bugs as they go. As long as you don’t write hundreds of lines of code without any testing, we think this style is OK too (and we don’t insist on one style over the other).

What are the testing practices you should consider?

There’s a lot to becoming proficient at TDD. Developing automated test suites, refactoring and reworking tests to eliminate duplication, and testing for exceptional conditions, are just a few. Additionally, acceptance tests, smoke tests, integration, performance and load tests support incremental development as well. If all this testing sounds like too much work, well…let’s get practical. Testing shouldn’t be done just for testing’s sake. Instead, the tests you write should give you leverage to confidently change and evolve your code base and validate the requirements of the system. That’s why it is important to know what to test, what not to test, and when to stop testing.

So, where should you start?

It is important to establish a team testing culture. Get the team on board using similar techniques and tools. Try some different approaches and then as a group reflect on what you’ve learned (have a retrospective). If you are starting a new project you might take a quite different approach than you would with an existing code base. It’s important to not get overwhelmed. Pick an area you want to focus on. For example, it’s much easier to write unit tests for new functionality. But sometimes you want to focus on writing tests for existing code that is buggy or needs to be modified. This can be more difficult. Maybe you want to concentrate on developing integration tests and automating them first (so that you can streamline your build and deploy process). It all depends on where you want to invest first. Just start modestly, grow your testing practices, and measure the impacts of your testing effort and benefits as you go. Of course the most important thing is to start somewhere and have testing become an important part of your development process.

The Refactory, Inc. principal Joseph Yoder & The Refactory, Inc. associate Rebecca Wirfs-Brock will be hosting a Pragmatic Test-driven Development course January 25-27, 2012 in the Portland Metro area.     Register Now!

{ 0 comments }

Joseph Yoder and Rebecca Wirfs-Brock will teach a Pragmatic TDD public course in Tigard, Oregon.

Course Info:

Courtyard Marriott – Tigard
15686 SW Sequoia Parkway
Tigard, OR 97224

First quarter of 2012

Test-driven development (TDD) means writing unit tests along with production code. It leads to modular, flexible and extensible code. Many aspire to follow TDD practices however few know how to do so effectively. Join Joseph Yoder, founder of the Refactory and Rebecca Wirfs-Brock, inventor of Responsibility-Driven Design as you learn Pragmatic TDD. In this 3 day intensive course you’ll learn several natural rhythms of testing, design and programming, uncover how refactoring affects tests, and see how acceptance and system quality tests support and enhance core TDD practices.

Limited space. Register for the Course Today!

{ 0 comments }

Agile and Test Driven Design Training in South Korea

July 14, 2011

As I finish this last day in South Korea, I’m reminded of the entire trip. It started a few months ago, with talks held in the balmy Florida heat. Today they’re fnished and I’m grateful to have been a part of such an exciting trip that took me literally halfway across the world to teach [...]

Read the full article →

MetaPLoP is Underway!

June 24, 2011

I’m in Douro Valley, Portugal for the MetaPLoP conference. I’m excited to see the results of this weekend’s efforts. The conference will be mining patterns for the best of the lot. We’ll be talking, discussing, and reviewing patterns related to Meta-Architectures, Adaptive Object Models, and Reflective Systems. The best patterns should stand out from the [...]

Read the full article →

Agile Portugal Tutorial and Talk

June 21, 2011

I’m currently at Agile Portugal. The conference will be over soon and then it’ll be time for MetaPLoP in Douro Valley. I was excited today to give my “Rulemakers and Toolmakers: Adaptive Object Models as Agile Division of Labor” tutorial. Rebecca Wirfs-Brock and I have worked hard to refine and enliven this tutorial. You can [...]

Read the full article →

Meta PLoP – June 24th – 26th, 2011

June 3, 2011

The first Meta PLoP is scheduled for June 24th to 26th, 2011 in Portugal. Here’s the description of the conference from the MetaPLoP.org website: MetaPLoP is a PLoP-like gathering focused on the specific topic of meta-architectures, adaptive object-models, and reflective systems. The main goal of MetaPLoP is to “mine” the best patterns that have been [...]

Read the full article →

An AOM Dissertation

June 1, 2011

Hugo Ferreira is a fellow AOM enthusiast. He and I have collaborated throughout the years, so when he asked me to write a forward for his thesis I did so with honor. I recently traveled to Portugal to sit on the jury of Hugo’s dissertation defense. The experience was a great one and I thought [...]

Read the full article →

SATURN 2011 Plenary Talk

May 26, 2011

I recently traveled to the SATURN 2011 conference in San Francisco. The Software Engineering Institute hosted the conference. Rebecca gave a talk entitled “Agile Adoption, Does It Have To Be All in Or Fold?” In her SATURN 2011 IEEE Software plenary talk, Rebecca Wirfs-Brock presented case studies of experience reports from the Agile Conference to illustrate [...]

Read the full article →

More Conferences and Adaptive Object Model Open Source Examples

November 11, 2010

I’ve recently returned from SPLASH 2010 and QCon 2010 held in San Francisco. Both conferences rewarded me with the opportunity to meet and greet plenty of AOM supporters. I was fortunate enough to host a tutorial named: Rulemakers and Toolmakers: Adaptive Object Models as Agile Division of Labor with Rebecca Wirfs-Brock. Adaptive Object Model Tutorial [...]

Read the full article →

A Summer and Fall Conference Tour

October 7, 2010

Recently I flew to Brazil to present a talk on AOMs at SugarLoaf PLoP. I did this talk/tutorial with Rebecca Wirfs-Brock.  Afterward, I attended the CBSoft conference in Salvador Brazil to talk about Architecture, including the most predominate software architecture deployed to date; Big Balls of Mud. This included looking at how Agile relates to [...]

Read the full article →