Archive for the 'Unit Testing' Category

Search for THE UnitTest Framework

September 29, 2006

I’m currently trying out Test Driven Development with some of my team members who are interested.
I’ve been looking for a unit test framework that is easy to use and light weight.
I’ve looked at CppUnit first since it is the most popular but it seemed difficult to use and the framework seemed to be too heavy.
I was looking for a framework for C/C++ that can support both Win32 development on the desktop and on a Windows Mobile(or Windows CE based) device.
I don’t know of any but I wanted something that can be ported to Windows Mobile with minor work.

During the search I came across a good article comparing 6 popular(?) frameworks.
(http://www.gamesfromwithin.com/articles/0412/000061.html)

After reading the article I tried out CppUnitLite and thought this was what I wanted.
Although it lacked some features like providing fixtures or test suites, I figured I could add the featured I’ve needed myself.
The framework was very lightweight and it seemed to be easily portable to any plaform.

After doing more searching I’ve found that the guy who wrote the article above also modified CppUnitLite and released it as CppUnitLite2.
(http://www.gamesfromwithin.com/articles/0512/000103.html)

Even more searching lead me to find that he and a few others evolved the framework and released it under a new name called “UnitTest++”.
(http://www.gamesfromwithin.com/articles/0603/000108.html)

After experimenting it a little I knew this is the framework that closely matches what I’ve been looking for.
It was easy to use just like CppUnitLite however there were enough features added to make a good use of it right away.
It wasn’t very lightweight but it’s not heavyweight either and it seemed perfect for my(or our) needs.
I’ve setup a new Windows Mobile 5.0 project on Visual Studio 2005 and tried building the framework.
I only had to comment out 2 functions that does not exist on Windows CE based device and it built successfully.

I’m planning to cover little bit more about my experienced on the framework on several following posts.

Advertisements