Showing posts with label TDD. Show all posts
Showing posts with label TDD. Show all posts

29 March 2011

Error Prevention

Michael Feathers gave this presentation two years ago and I just got around to listening to it. This is a nice summary of a handful of techniques (like Test Driven Development and Design By Contract for example) you may have heard of but never understood what they do.

He asks in the end why don't we use them more and what do they have in common?

It is worth listening to and following his slides below the video. One slide that surprised me was a study by Caper Jones showing that the defect rate by language went down as the language became a higher level language (or more OO and Functional). Assembly and C had the highest rate of defects for the ones studied.

The Ethics Of Error Prevention - Michael Feathers

25 July 2010

Every wonder how to get started with TDD?

Recently, Brett Schuchert has started to put together a series of videos called C++ and TDD. Here is the first in the series called C++ and TDD, Getting Started. Follow the other links to see his follow-on videos.

I found these to be pretty much how it feels to do TDD with C++. He uses Eclipse with the CDT plugin for C++ and CppUnit for a unit test framework. The development environment looks very similar to how we do development on the MCATK team.

The only exception is that CppUnit has been integrated into Eclipse so that Eclipse is aware of the CppUnit. Whereas on the MCATK, we use UnitTest++ and Eclipse is unaware of the unit test framework though our build system is aware of it.

These videos are pretty straight forward and the example project he is working on is easy to follow. If you have been curious about TDD and how it is done then have at look at Brett's videos.

20 June 2009

Unit Test Framework: UnitTest++

There are numerous unit test frameworks for C++ out there. The software effort that I am on uses one called UnitTest++ (aka UT++). It was designed and developed by games developers and it is open source.

The debut release post at Games From Within describes why another unit test framework, the design reasons, and its strengths & uniqueness.

UT++ practices what it preaches by being developed using test driven development (TDD) and comes with a suite of unit tests that runs automatically upon completion of the build. Not only do these tests give you confidence UT++ is installed correctly they also come in handy as developer documentation and even user examples & documentation. They are very nice examples of how one can use the framework.

UT++ is simple, lightweight, and easy to learn. If you have not used a unit test framework before then I can recommend UT++ as a place to start learning.