6 added 447 characters in body
source | link

Unit testing framework comparison criteria

There are fourYou should consider the following important criterionscriteria for comparing C++ unit testing frameworks:

  1. Compatibility: whether the framework compiles with your project. You may be using options like -fno-rtti and some frameworks then fail to compile.
  2. User friendliness: how much work is it to write a test. C++ does not have reflection, so frameworks have to solve test registration somehow.
  3. Features: can it do what you need it to do? According to a post on Google Testing Blog, most frameworks have the necessary features and differ mostly on points 1 and 2.
  4. Popularity & Familiarity: whether people know the framework. This is important especially for free software, not to limit potential contributor base.

Popular frameworks and their popularity measures

To measure popularity, it might be enough to search Stack Overflow and GitHub. Trends areThe following statistics were gathered in (much)January 2016 and may well change drastically over time; also, trends, not presented here, may be more important than absolute numbers.

Stackoverflow-popular frameworks

SearchA search for [unit-testing] [c++] finds (Jan 2016) 1,211 questions on SO.
On GitHub there is (Jan 2016) about 461,000 repositories Searching for query "language:C++".

Stack Overflowindividual frameworks, we find:

  • Google Test; Jan 2016 [googletest]: 857 questions (keyword term [googletest])
  • CppUnit; Jan 2016 [cppunit]: 203 questions (keyword term [cppunit])
  • Catch; Jan 2016 [catch-unit-test]: 12 12 questions (keyword term [catch-unit-test])

GitHub-popular frameworks

On GitHub there is about 461,000 repositories for query "language:C++".

GitHub:

  • Google Test; Jan 2016 "include gtest.h": 1,870,016 C++ files (search term: "include gtest.h")
  • CppUnit; Jan 2016 "include cppunit": 297,525 C++ files (search term: "include cppunit")
  • Catch; Jan 2016 "include catch.hpp": 11,888 C++ files (search term: "include catch.hpp"(
  • CppUnitLite; Jan 2016 "include CppUnitLite": 1,214 C++ files (search term: "include CppUnitLite")

(the number in "We’ve found xxx code results" after clicking C++ in the left menu)

 

It would seem that Google Test is a clear winner of thisthe SO+GitHub popularity contest, most likely because it was adopted by large projects like LLVM and Chromium.

There are four important criterions:

  1. Compatibility: whether the framework compiles with your project. You may be using options like -fno-rtti and some frameworks then fail to compile.
  2. User friendliness: how much work is it to write a test. C++ does not have reflection, so frameworks have to solve test registration somehow.
  3. Features: can it do what you need it to do? According to a post on Google Testing Blog, most frameworks have the necessary features and differ mostly on points 1 and 2.
  4. Popularity & Familiarity: whether people know the framework. This is important especially for free software, not to limit potential contributor base.

To measure popularity, it might be enough to search Stack Overflow and GitHub. Trends are (much) more important than absolute numbers.

Search for [unit-testing] [c++] finds (Jan 2016) 1,211 questions on SO.
On GitHub there is (Jan 2016) about 461,000 repositories for query "language:C++".

Stack Overflow:

  • Google Test; Jan 2016 [googletest]: 857 questions
  • CppUnit; Jan 2016 [cppunit]: 203 questions
  • Catch; Jan 2016 [catch-unit-test]: 12 questions

GitHub:

  • Google Test; Jan 2016 "include gtest.h": 1,870,016 C++ files
  • CppUnit; Jan 2016 "include cppunit": 297,525 C++ files
  • Catch; Jan 2016 "include catch.hpp": 11,888 C++ files
  • CppUnitLite; Jan 2016 "include CppUnitLite": 1,214 C++ files

(the number in "We’ve found xxx code results" after clicking C++ in the left menu)

It would seem that Google Test is a clear winner of this popularity contest, most likely because it was adopted by large projects like LLVM and Chromium.

Unit testing framework comparison criteria

You should consider the following important criteria for comparing C++ unit testing frameworks:

  1. Compatibility: whether the framework compiles with your project. You may be using options like -fno-rtti and some frameworks then fail to compile.
  2. User friendliness: how much work is it to write a test. C++ does not have reflection, so frameworks have to solve test registration somehow.
  3. Features: can it do what you need it to do? According to a post on Google Testing Blog, most frameworks have the necessary features and differ mostly on points 1 and 2.
  4. Popularity & Familiarity: whether people know the framework. This is important especially for free software, not to limit potential contributor base.

Popular frameworks and their popularity measures

To measure popularity, it might be enough to search Stack Overflow and GitHub. The following statistics were gathered in January 2016 and may well change drastically over time; also, trends, not presented here, may be more important than absolute numbers.

Stackoverflow-popular frameworks

A search for [unit-testing] [c++] finds 1,211 questions on SO. Searching for individual frameworks, we find:

  • Google Test: 857 questions (keyword term [googletest])
  • CppUnit: 203 questions (keyword term [cppunit])
  • Catch: 12 questions (keyword term [catch-unit-test])

GitHub-popular frameworks

On GitHub there is about 461,000 repositories for query "language:C++".

GitHub:

  • Google Test: 1,870,016 C++ files (search term: "include gtest.h")
  • CppUnit: 297,525 C++ files (search term: "include cppunit")
  • Catch: 11,888 C++ files (search term: "include catch.hpp"(
  • CppUnitLite: 1,214 C++ files (search term: "include CppUnitLite")

(the number in "We’ve found xxx code results" after clicking C++ in the left menu)

 

It would seem that Google Test is a clear winner of the SO+GitHub popularity contest, most likely because it was adopted by large projects like LLVM and Chromium.

5 replaced http://stackoverflow.com/ with https://stackoverflow.com/
source | link

There are four important criterions:

  1. Compatibility: whether the framework compiles with your project. You may be using options like -fno-rtti and some frameworks then fail to compile.
  2. User friendliness: how much work is it to write a test. C++ does not have reflection, so frameworks have to solve test registration somehow.
  3. Features: can it do what you need it to do? According to a post on Google Testing Blog, most frameworks have the necessary features and differ mostly on points 1 and 2.
  4. Popularity & Familiarity: whether people know the framework. This is important especially for free software, not to limit potential contributor base.

To measure popularity, it might be enough to search Stack OverflowStack Overflow and GitHub. Trends are (much) more important than absolute numbers.

Search for [unit-testing] [c++] finds (Jan 2016) 1,211 questions on SO.
On GitHub there is (Jan 2016) about 461,000 repositories for query "language:C++".

Stack Overflow:

  • Google Test; Jan 2016 [googletest]: 857 questions
  • CppUnit; Jan 2016 [cppunit]: 203 questions
  • Catch; Jan 2016 [catch-unit-test]: 12 questions

GitHub:

  • Google Test; Jan 2016 "include gtest.h": 1,870,016 C++ files
  • CppUnit; Jan 2016 "include cppunit": 297,525 C++ files
  • Catch; Jan 2016 "include catch.hpp": 11,888 C++ files
  • CppUnitLite; Jan 2016 "include CppUnitLite": 1,214 C++ files

(the number in "We’ve found xxx code results" after clicking C++ in the left menu)

It would seem that Google Test is a clear winner of this popularity contest, most likely because it was adopted by large projects like LLVM and Chromium.

There are four important criterions:

  1. Compatibility: whether the framework compiles with your project. You may be using options like -fno-rtti and some frameworks then fail to compile.
  2. User friendliness: how much work is it to write a test. C++ does not have reflection, so frameworks have to solve test registration somehow.
  3. Features: can it do what you need it to do? According to a post on Google Testing Blog, most frameworks have the necessary features and differ mostly on points 1 and 2.
  4. Popularity & Familiarity: whether people know the framework. This is important especially for free software, not to limit potential contributor base.

To measure popularity, it might be enough to search Stack Overflow and GitHub. Trends are (much) more important than absolute numbers.

Search for [unit-testing] [c++] finds (Jan 2016) 1,211 questions on SO.
On GitHub there is (Jan 2016) about 461,000 repositories for query "language:C++".

Stack Overflow:

  • Google Test; Jan 2016 [googletest]: 857 questions
  • CppUnit; Jan 2016 [cppunit]: 203 questions
  • Catch; Jan 2016 [catch-unit-test]: 12 questions

GitHub:

  • Google Test; Jan 2016 "include gtest.h": 1,870,016 C++ files
  • CppUnit; Jan 2016 "include cppunit": 297,525 C++ files
  • Catch; Jan 2016 "include catch.hpp": 11,888 C++ files
  • CppUnitLite; Jan 2016 "include CppUnitLite": 1,214 C++ files

(the number in "We’ve found xxx code results" after clicking C++ in the left menu)

It would seem that Google Test is a clear winner of this popularity contest, most likely because it was adopted by large projects like LLVM and Chromium.

There are four important criterions:

  1. Compatibility: whether the framework compiles with your project. You may be using options like -fno-rtti and some frameworks then fail to compile.
  2. User friendliness: how much work is it to write a test. C++ does not have reflection, so frameworks have to solve test registration somehow.
  3. Features: can it do what you need it to do? According to a post on Google Testing Blog, most frameworks have the necessary features and differ mostly on points 1 and 2.
  4. Popularity & Familiarity: whether people know the framework. This is important especially for free software, not to limit potential contributor base.

To measure popularity, it might be enough to search Stack Overflow and GitHub. Trends are (much) more important than absolute numbers.

Search for [unit-testing] [c++] finds (Jan 2016) 1,211 questions on SO.
On GitHub there is (Jan 2016) about 461,000 repositories for query "language:C++".

Stack Overflow:

  • Google Test; Jan 2016 [googletest]: 857 questions
  • CppUnit; Jan 2016 [cppunit]: 203 questions
  • Catch; Jan 2016 [catch-unit-test]: 12 questions

GitHub:

  • Google Test; Jan 2016 "include gtest.h": 1,870,016 C++ files
  • CppUnit; Jan 2016 "include cppunit": 297,525 C++ files
  • Catch; Jan 2016 "include catch.hpp": 11,888 C++ files
  • CppUnitLite; Jan 2016 "include CppUnitLite": 1,214 C++ files

(the number in "We’ve found xxx code results" after clicking C++ in the left menu)

It would seem that Google Test is a clear winner of this popularity contest, most likely because it was adopted by large projects like LLVM and Chromium.

4 sort lists based on number of results
source | link

There are four important criterions:

  1. Compatibility: whether the framework compiles with your project. You may be using options like -fno-rtti and some frameworks then fail to compile.
  2. User friendliness: how much work is it to write a test. C++ does not have reflection, so frameworks have to solve test registration somehow.
  3. Features: can it do what you need it to do? According to a post on Google Testing Blog, most frameworks have the necessary features and differ mostly on points 1 and 2.
  4. Popularity & Familiarity: whether people know the framework. This is important especially for free software, not to limit potential contributor base.

To measure popularity, it might be enough to search Stack Overflow and GitHub. Trends are (much) more important than absolute numbers.

Search for [unit-testing] [c++] finds (Jan 2016) 1,211 questions on SO.
On GitHub there is (Jan 2016) about 461,000 repositories for query "language:C++".

Stack Overflow:

GitHub:

(the number in "We’ve found xxx code results" after clicking C++ in the left menu)

It would seem that Google Test is a clear winner of this popularity contest, most likely because it was adopted by large projects like LLVM and Chromium.

There are four important criterions:

  1. Compatibility: whether the framework compiles with your project. You may be using options like -fno-rtti and some frameworks then fail to compile.
  2. User friendliness: how much work is it to write a test. C++ does not have reflection, so frameworks have to solve test registration somehow.
  3. Features: can it do what you need it to do? According to a post on Google Testing Blog, most frameworks have the necessary features and differ mostly on points 1 and 2.
  4. Popularity & Familiarity: whether people know the framework. This is important especially for free software, not to limit potential contributor base.

To measure popularity, it might be enough to search Stack Overflow and GitHub. Trends are (much) more important than absolute numbers.

Search for [unit-testing] [c++] finds (Jan 2016) 1,211 questions on SO.
On GitHub there is (Jan 2016) about 461,000 repositories for query "language:C++".

Stack Overflow:

  • Catch; Jan 2016 [catch-unit-test]: 12 questions
  • CppUnit; Jan 2016 [cppunit]: 203 questions
  • Google Test; Jan 2016 [googletest]: 857 questions

GitHub:

  • Catch; Jan 2016 "include catch.hpp": 11,888 C++ files
  • CppUnit; Jan 2016 "include cppunit": 297,525 C++ files
  • CppUnitLite; Jan 2016 "include CppUnitLite": 1,214 C++ files
  • Google Test; Jan 2016 "include gtest.h": 1,870,016 C++ files

(the number in "We’ve found xxx code results" after clicking C++ in the left menu)

It would seem that Google Test is a clear winner of this popularity contest, most likely because it was adopted by large projects like LLVM and Chromium.

There are four important criterions:

  1. Compatibility: whether the framework compiles with your project. You may be using options like -fno-rtti and some frameworks then fail to compile.
  2. User friendliness: how much work is it to write a test. C++ does not have reflection, so frameworks have to solve test registration somehow.
  3. Features: can it do what you need it to do? According to a post on Google Testing Blog, most frameworks have the necessary features and differ mostly on points 1 and 2.
  4. Popularity & Familiarity: whether people know the framework. This is important especially for free software, not to limit potential contributor base.

To measure popularity, it might be enough to search Stack Overflow and GitHub. Trends are (much) more important than absolute numbers.

Search for [unit-testing] [c++] finds (Jan 2016) 1,211 questions on SO.
On GitHub there is (Jan 2016) about 461,000 repositories for query "language:C++".

Stack Overflow:

  • Google Test; Jan 2016 [googletest]: 857 questions
  • CppUnit; Jan 2016 [cppunit]: 203 questions
  • Catch; Jan 2016 [catch-unit-test]: 12 questions

GitHub:

  • Google Test; Jan 2016 "include gtest.h": 1,870,016 C++ files
  • CppUnit; Jan 2016 "include cppunit": 297,525 C++ files
  • Catch; Jan 2016 "include catch.hpp": 11,888 C++ files
  • CppUnitLite; Jan 2016 "include CppUnitLite": 1,214 C++ files

(the number in "We’ve found xxx code results" after clicking C++ in the left menu)

It would seem that Google Test is a clear winner of this popularity contest, most likely because it was adopted by large projects like LLVM and Chromium.

3 added 318 characters in body
source | link
2 Improved formatting of the question, added links to test frameworks.
source | link
1
source | link
    Post Made Community Wiki by user7610