The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

C++ unit test framework recommendations

For the first time in my life I find myself in a position where I can choose whatever c++ unit test framework (gotta love startups) I want instead of adopting whatever has been in place.

I know I can google for c++ unit test frameworks and find a lot of them. I know that I should pick a c++ unit test framework that suits my needs. I would love to hear what cross-platform C++ unit test *you* are using and why you love it. At least that would help me narrow it down to a manageable size where I can individually evaluate them.

Today I stumbled upon googletest; the Google unit test c++ framework (http://code.google.com/p/googletest/wiki/GoogleTestFAQ). Has anyone used this in your own project? How do you like it in comparisons with another unit test framework you have used more?

Thanks again for the input!
Ragi Burhum Send private email
Thursday, September 18, 2008
 
 
I use EasyUnit, because it's dead simple to use from Visual Studio.
http://easyunit.sourceforge.net/

I find it a lot simpler to use than boost::test.
(User deleted) Send private email
Thursday, September 18, 2008
 
 
I've used CppUnit for a while.  It may be deprecated, though.  I think its inventor has moved on to greener pastures.
Michael Gibson Send private email
Friday, September 19, 2008
 
 
I'm using CxxTest (.sf.net)
It does not require to duplicate functions names or anything else as the "introspection" is done by a little Perl script.
It has a lot of ASSERT tests, and a neat documentation.
Luc Hermitte Send private email
Friday, September 19, 2008
 
 
Personally, I don't think you can go too far wrong with any of the unit test frameworks though I agree some may be easier than others to use.

I've used CppUnit, CxxTest, and Boost. Boost has abysmal documentation. Otherwise, all get the job done.

Btw, I heard at Agile 2008 that someone will be coming out with a decent mock object library for C++ soon. It was very hush hush but it sounded imminent.
Bruce
Friday, September 19, 2008
 
 
I use UnitTest++. It is extremely simple to setup and use.

http://unittest-cpp.sourceforge.net/

One of its authors wrote an excellent comparison of C++ unit testing libraries. It is old but still very relevant.

http://www.gamesfromwithin.com/articles/0412/000061.html
triple-dot
Saturday, September 20, 2008
 
 
I use googletest..  It seems fine, although I haven't used any other C++ unit testing frameworks.

In the paste I've used JUnit, and I've also implemented my own simple framework in Java.  I like googletest better than either of those.
petermck
Sunday, September 21, 2008
 
 
Parasoft C++test is ok for me
Alex
Sunday, September 21, 2008
 
 
I used cxxTest in one application, it works quite nicely. For another I rolled my own as I wanted to integrate it directly in the product.
Tony Edgecombe Send private email
Monday, September 22, 2008
 
 
Thanks for all the suggestions... I think I have a good hunch of which I am going to use...

Thanks again!
Ragi Burhum Send private email
Monday, September 22, 2008
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz