---
title: "Comparing C++ unit testing frameworks"
url: "https://osherove.com/blog/2004/12/29/comparing-c-unit-testing-frameworks.md"
canonical: "https://osherove.com/blog/2004/12/29/comparing-c-unit-testing-frameworks.html"
published: "2004-12-29T22:11:00"
updated: "2004-12-29T22:11:00"
tags: ["Agile Related", "Cool Articles"]
author: "Roy Osherove"
description: "Noel Llopis writes on the TDD mailing list: I just had to choose a unit-testing framework for a new project at work, so I went ahead and evaluated some of the major contenders for C++: CppUnit, Boost.Test, CppUnitLite,…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Comparing C++ unit testing frameworks

By Roy Osherove December 29, 2004 In [Agile Related](https://osherove.com/blog/category/agile-related), [Cool Articles](https://osherove.com/blog/category/cool-articles)

**Historical article** · Originally published December 29, 2004; technical details may be outdated.

Noel Llopis writes on the TDD mailing list:

_I just had to choose a unit-testing framework for a new project at work, so
I went ahead and evaluated some of the major contenders for C++: CppUnit,
Boost.Test, CppUnitLite, NanoCppUnit, Unit++, and CxxUnit._

_If anybody is interested in checking it out, I wrote a comparison of the
frameworks and my conclusions here:
_[_http://www.gamesfromwithin.com/articles/0412/000061.html_](http://www.gamesfromwithin.com/articles/0412/000061.html)

_I welcome any comments either through the list, private email, or directly
in the blog.
Cheers._

_\--Noel
Games from Within
_[_http://www.gamesfromwithin.com_](http://www.gamesfromwithin.com/)

I haven't read it all through yet, but it seems pretty comprehensive and interesting.

**The big winner** in this article is a total surprise: [CxxTest](http://cxxtest.sourceforge.net/). What's the big surprise? It actually uses PERL under the convers to provide an easy to use syntax that is used as the basis for generating C++ test classes on your code. Pretty cool, actually. Here's a part on this cool finding from the article:

_"After looking into a framework that tried to be different from XUnit (Unit++), I wasn't particularly looking forward to evaluating possibly the most wacky one of them all, CxxTest. I had never heard of it until a few days ago, but I knew that it required using Perl along the way to generate some C++ code. My spider senses were tingling._

_Boy was I wrong!! Within minutes of using CxxTest and reading through its great documentation (the best by far), I was completely convinced this was the way to go. This came as a complete surprise to me since I was ready to leave somewhat dissatisfied and pronounce a victor between CppUnit and CppUnitLite."_

## More in Agile Related

[All posts in Agile Related](https://osherove.com/blog/category/agile-related)

- Jan 5, 2005

    ### [Zanebug v1.4.3 - a better NUnit GUI?](https://osherove.com/blog/2005/1/5/zanebug-v143-a-better-nunit-gui.html)

- Jan 1, 2005

    ### [The case for staged delivery and Agile methodologies](https://osherove.com/blog/2005/1/1/the-case-for-staged-delivery-and-agile-methodologies.html)

- Dec 10, 2004

    ### [I changed my mind - Mock objects are wrong for database unit testing](https://osherove.com/blog/2004/12/10/i-changed-my-mind-mock-objects-are-wrong-for-database-unit-t.html)

- Dec 7, 2004

    ### [MSF is a fraud? A response](https://osherove.com/blog/2004/12/7/msf-is-a-fraud-a-response.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
