Unit testing for games

Has anyone actually tried doing unit testing for any of the games they’d worked on? How did it go?

I’m interested in the idea (partially because I’ll apparently get a more decoupled design as a side effect, partically because it sounds quite helpful) but don’t really have any idea of where to start.

I noticed Eclipse has a neat introduction to using JUnit, but it assumes that you already know how to write a good unit test in the first place. Does anyone have any links or tips for starting to write unit tests in the first place?

I tried for a few weeks writing JUnit tests (which I now use at work as a matter of course) for Mini Adventure. It didn’t really work out to well and slowed me down initially.

I’m all for unit testing, and it does work especially well in engineered systems… but when you’re writing something in spare time it felt like a bit of overhead.

Kev

This article might interest you.

http://www.gamasutra.com/features/20050329/roken_01.shtml

You need to sign up for a free membership to read it.

Interesting article. Thanks for the link kevglass :slight_smile:

kevglass - CaptainJester

Kev