Automated Testing

Started by
4 comments, last by Flarelocke 18 years, 4 months ago
Hi everyone, Unit testing/automated testing: I just finished reading several articles over at Gamasutra, this being the last one I read. In the article they briefly mention some automated testing tools, cppUnit being the main one. I would like to "start right" and setup automated testing in the project I'm starting. I'd like to know what is in standard use in the "real world", and what's available to me that would teach me the same things. If you are or have used any automated testing software, please let me know. I've read up on cppUnit a bit, but I don't know what else is out there. Any recommendations are appreciated. Thanks, -Michael g. ps. While I'm at it, I've been checking into free CVS software... I think it would be a great thing for the moderator(s) of this thread to add a FAQ with links to common/good/popular CVS software and Unit Testing software. (As well as any other "main" FAQ topics in Software Engineering)
Advertisement
In addition to CppUnit:

NUnit (for the .NET framework)
JUnit (for Java)
PyUnit (for Python)

There are many others, commonly called 'xUnit' to refer to the whole set of them.

There are tools to help out with mock objects, such as DotNetMock, and JMock. I don't know of a C++ version. It might not be possible to make one since C++ doesn't support reflection.

These are testing tools to ensure that the code doesn't break (ie: programmer errors), but they don't test the functionality (ie: design errors). For that, you'll want another tool called FIT, or FITNESSE that is a WIKI interface to FIT.

There are many books and web sites that can give you examples of good unit tests. There are even a few articles related specifically to unit testing in game developement such as this one.
That's great :)
I had read the TDD series at objectmentor.com and near the end they mentioned Fitnesse... I'd never heard of it, or seen it anywhere. No links were given and I *assumed* it to be made up for the sake of the article.

As for C++ mock objects, in the article you linked for me, I found a reference to Mockpp (I believe it was in the comments on the article.)

I'm new to all this, and I'd like to know if this (Mockpp) represents a *standard* way of doing this stuff (input please?)

The other main testing "stuff" I found was Boost's test library
Could someone please comment on how standard it would be to use this approach?

Fitnesse's site appears to be down (?) google's cache doesn't give me anything either (!)


My plan right now is to begin implementing this stuff (unit tests, FIT + Fitnesse, Mockpp) in a new project, (honestly, I'm just getting back into the swing of things, programming wise) follow the installation instructions, then the use instructions, and try flying from the seat of my pants.

Please let me know if I'm missing some vital component in the TDD paradigm,

Thanks,
-Michael g.
You might want to look at FIT, the tool that FitNesse is based on.
Woah! You need to check out CxxTest. It's by far the best C++ unit testing framework.

I modified my copy of it slightly so that the output is parsable by visual studio. If you run your app as a post-build step, .NET will catch the output and display errors in your task list just as it does normal compiler errors.

I use it for all my game development unit testing needs!

http://cxxtest.sourceforge.net/
- Jason Citron- Programmer, Stormfront Studios- www.stormfront.com
There's also QuickCheck, which is a little different from your usual test harnesses.
---New infokeeps brain running;must gas up!

This topic is closed to new replies.

Advertisement