Skip to content

Google Test

My primary test framework for C++ projects is Google Test due to its heavy support for mocking and other advanced features.  I also really like the fact that the CLion IDE from JetBrains has built-in support for Google Test.

Features:

  • xUnit test framework
  • Rich set of assertions
  • User-defined assertions
  • Death tests
  • Fatal and non-fatal failures
  • Parameratized tests by value and type
  • Variety of options for running tests

Supported on a variety of platforms:

  • Linux
  • macOS
  • Windows
  • Windows Mobile
  • Cygwin
  • MinGW
  • Symbian

https://github.com/google/googletest

Parallel test execution

Google also has a script that in their gtest-parallel project which can significantly speed up test case execution on multi-core machines.  This script first gets the list of all the tests cases and then launches multiple processes to run all the tests.

Published inunit-test

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *