ExUnit vs GoogleTest
ExUnit
hexdocs.pmGoogleTest
google.github.ioSide by side
| Figure | ExUnit | GoogleTest |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Windows | — | Yes |
| macOS | — | Yes |
| Linux | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Unit Testing Frameworks | 8.3 (#4) | 8.1 (#8) |
| Spec score · Unit Testing | 8.2 (#6) | 8.0 (#7) |
| Assertions | ExUnit.Assertions provides macros that generate assertions with appropriate error messages. | GoogleTest provides assertions for equality, inequality, exceptions, and other conditions, and supports user-defined assertions. |
| License | The Elixir source code is released under the Apache License 2.0. | The repository uses the BSD-3-Clause license, permitting source and binary redistribution subject to its conditions and disclaimer. |
| Purpose | ExUnit is a unit testing framework for Elixir. | GoogleTest is Google’s C++ testing and mocking framework. |
Plans
In their own words
GoogleTest
GoogleTest is Google’s free C++ framework for testing and mocking on Linux, macOS, and Windows. Built on the xUnit architecture, it supports many kinds of C++ tests rather than only unit tests and discovers tests automatically without manual registration. Assertions cover equality, inequality, exceptions, and other conditions, with support for user-defined assertions. The framework includes fatal and non-fatal failures, death tests, and value-parameterized and type-parameterized cases. Developers can run individual tests, choose an order, or execute tests in parallel. Quickstarts cover Bazel and CMake, and pkg-config files help compile and link GoogleTest and GoogleMock. Documentation includes primers, advanced topics, mocking guides, FAQs, references, samples, and community material. The 1.18.x branch requires at least C++17. GoogleTest follows Google’s Foundational C++ Support Policy and publishes supported compiler, platform, and build-tool versions. It uses the BSD-3-Clause license, permitting redistribution under its conditions.