1 Sep 2008 06:31
Re: How easy is it to unit test
Thatcher Ulrich <tu <at> tulrich.com>
2008-09-01 04:31:32 GMT
2008-09-01 04:31:32 GMT
On Sun, Aug 31, 2008 at 12:51 PM, Noel Llopis <llopis <at> gmail.com> wrote: > On Sat, Aug 30, 2008 at 8:00 PM, Thatcher Ulrich <tu <at> tulrich.com> wrote: >> >> * unit tests are dead easy to write. It's not a chore at all; it in >> fact makes my job much easier. PROVIDED there is a good testing >> framework in place. Getting a good testing framework in place, and >> keeping it running, can indeed be an incredible chore. > > Funny, I'd almost say the opposite. In my experience getting a good > testing framework in place and keeping it running is trivial > (http://unittest-cpp.sourceforge.net/ or the new Google one) Definitely start there, something like that is important, but in my opinion the larger framework needs to actually run the tests and send informative, targeted emails. I think that's outside the scope of unittest-cpp or gunit because it gets into your source control and build system and whatnot. But if you don't have it, developers need to remember to run the tests, that introduces a lot of drag, and you're not really getting full value. Like, one syndrome that happens is devs who aren't on board with unit testing don't run the tests, they inadvertently break the tests, and then test-aware devs later discover the breakage and have to either nag the culprits or fix things themselves. Gah. Far better and easier for everyone if you get a specific automated email soon after submitting a breakage, showing what test broke and what change is implicated. -T _______________________________________________ Sweng-Gamedev mailing list Sweng-Gamedev <at> lists.midnightryder.com(Continue reading)
Nope, we don't all agree.
Hopefully everyone on this list is already clear on the difference, but
since I often see people confuse the two, I wanted to stress that "using
unit tests" and "using TDD" are two VERY different things.
I would be surprised to hear anyone say that unit testing is bad. However,
writing the tests _before_ you write the code (which is the key tenet
behind TDD) is not "obviously better" than alternatives such as
test-last.
Christer Ericson, Director of Tools and Technology
Sony Computer Entertainment, Santa Monica
RSS Feed