Category: Test-Driven Development

UnitTest++ v1.0 Released - 18 March 2006
We grabbed the best features of each framework and created what we think it's the best C++ unit-testing framework out there (for our needs anyway). We took the results and put them up in Sourceforge under a veryunrestrictive license, and that's how UnitTest++ was born. [more]

We have all experienced how development slows down to a crawl towards the end of a project. We have seen first-hand the difficulty of squashing insidious many-headed bugs. We have wrestled with somebody else's code, just to give up or fully re-write it in despair. We have sat in frustration, unable to do any work for several hours while the game build is broken. Code can get too complex for its own good. See how doing something so apparently backwards as writing unit tests before any code can help with all those problems. [more]

CppUnitLite2 1.1 - 17 December 2005
At this point, we have been using CppUnitLite2 for a year at High Moon Studios doing test-driven development on Windows, Xbox 360, and some PS3. It has been used to unit test libraries of an engine, pipeline tools, GUI applications, and production game code. [more]

After reading the first two parts of this article, you should have enough information to strike boldly and apply test-driven development to your projects. At first you're likely to find that the road is somewhat rough and bumpy, though. How do you break up this module into something testable? How can you prevent your tests from becoming a burden to maintain? What exactly should you test? [more]

Part 1 of this article provided just a glimpse of what was behind the looking glass. Now we're ready to dive in all the way and look at how we can apply test-driven development to games. Be warned: the looking glass is very much one-way only. After you try this, you might become test infected and may never be able to go back and write code the way you've done up until now. [more]

If you're a typical game developer, you probably don't write any tests for the code you create. So how would you feel about not just writing tests, but creating them before the code they are testing? What if I told you those tests don't even verify that the code you write is correct? "It's madness," you might say; "it's all backwards!" Not really. It all makes sense in its own way. Follow me through the looking glass and I'll show you the wonderful upside-down world of test-driven development and how we can apply it to games. [more]

One of the topics I've been meaning to get to for quite a while is the applicability of test-driven development in games. I will get to that soon. I promise! In the meanwhile I'm now in the situation that I need to choose a unit-testing framework to roll out for my team at work. So, before I get to talk about how to use test-driven development in games, or the value of unit testing, or anything like that, we dive deep into a detailed comparison of existing C++ unit-testing frameworks. Hang on tight. It's going to be a long and bumpy ride with a plot twist at the end. [more]