views:

422

answers:

8

I'm looking for a "quick and dirty" C++ testing framework I can use on my Windows/Visual Studio box. It's just me developing, so it doesn't have to be enterprise class software. Staring at a list of testing frameworks, I am somewhat befuddled...

http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C.2B.2B

+4  A: 

I have used both UnitTest++ and Boost.Test. They are both easy to setup and use. Although, I wouldn't use Boost.Test if you're not already using the Boost libraries. It's a bit much to install all of Boost just to get the testing framework.

Ferruccio
+5  A: 

Great question! There have already been a few questions that address

A few:

Scott Saad
A: 

See also How do you implement unit-testing in large scale C++ projects? for the link to the article in Overload Journal about UT frameworks for C++.

Luc Hermitte
+5  A: 

Here's a great article about C++ TDD frameworks. For the record, my personal preference is CxxTest, which I have been happily using for about six months now.

Nik Reiman
A: 

To get a bare bones testing suite going, I recommend the include-only "Fructose". It is especially neat if you want your tests to run on platforms where text output requires calling non-standard APIs (think gaming consoles, embedded devices etc.)

Rune Braathen
+3  A: 

Also take a look at googletest, Google's C++ test framework.

mfazekas
A: 

I use UnitTest++ and AMOP for the Mock objects.

However now I would take a long hard look at GoogleTest and GoogleMock as they would probably complement each other quite well.

graham.reeds
A: 

Have a look at CUnitWin32. It includes an example.

Dushara