Skip to content
SPECIFICTION
Get listed

GoogleTest vs pytest

GoogleTest

google.github.io

pytest

pytest.org

Side by side

FigureGoogleTestpytest
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WindowsYes—
macOSYes—
LinuxYesYes
Plans published11
Spec score · Unit Testing8.0 (#7)7.4 (#20)
Spec score · Unit Testing Frameworks8.1 (#8)7.4 (#26)
AssertionsGoogleTest provides assertions for equality, inequality, exceptions, and other conditions, and supports user-defined assertions.pytest provides detailed information about failing assert statements through assertion introspection.
PurposeGoogleTest is Google’s C++ testing and mocking framework.pytest is a framework for writing small, readable tests that can scale to complex functional testing for applications and libraries.
Test discoveryGoogleTest automatically discovers and runs tests without requiring manual registration.pytest automatically discovers test modules and functions using standard naming conventions.

Plans

GoogleTest

  • GoogleTestFree

GoogleTest pricing →

pytest

  • pytestFree

pytest pricing →

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.

Visit google.github.io

pytest

pytest has no write-up on Specifiction yet; its figures are above.

Visit pytest.org