README.md
1# GoogleTest
2
3### Announcements
4
5#### Live at Head
6
7GoogleTest now follows the
8[Abseil Live at Head philosophy](https://abseil.io/about/philosophy#upgrade-support).
9We recommend
10[updating to the latest commit in the `main` branch as often as possible](https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#what-is-live-at-head-and-how-do-i-do-it).
11We do publish occasional semantic versions, tagged with
12`v${major}.${minor}.${patch}` (e.g. `v1.15.0`).
13
14#### Documentation Updates
15
16Our documentation is now live on GitHub Pages at
17https://google.github.io/googletest/. We recommend browsing the documentation on
18GitHub Pages rather than directly in the repository.
19
20#### Release 1.15.0
21
22[Release 1.15.0](https://github.com/google/googletest/releases/tag/v1.15.0) is
23now available.
24
25The 1.15.x branch requires at least C++14.
26
27#### Continuous Integration
28
29We use Google's internal systems for continuous integration.
30
31#### Coming Soon
32
33* We are planning to take a dependency on
34 [Abseil](https://github.com/abseil/abseil-cpp).
35
36## Welcome to **GoogleTest**, Google's C++ test framework!
37
38This repository is a merger of the formerly separate GoogleTest and GoogleMock
39projects. These were so closely related that it makes sense to maintain and
40release them together.
41
42### Getting Started
43
44See the [GoogleTest User's Guide](https://google.github.io/googletest/) for
45documentation. We recommend starting with the
46[GoogleTest Primer](https://google.github.io/googletest/primer.html).
47
48More information about building GoogleTest can be found at
49[googletest/README.md](googletest/README.md).
50
51## Features
52
53* xUnit test framework: \
54 Googletest is based on the [xUnit](https://en.wikipedia.org/wiki/XUnit)
55 testing framework, a popular architecture for unit testing
56* Test discovery: \
57 Googletest automatically discovers and runs your tests, eliminating the need
58 to manually register your tests
59* Rich set of assertions: \
60 Googletest provides a variety of assertions, such as equality, inequality,
61 exceptions, and more, making it easy to test your code
62* User-defined assertions: \
63 You can define your own assertions with Googletest, making it simple to
64 write tests that are specific to your code
65* Death tests: \
66 Googletest supports death tests, which verify that your code exits in a
67 certain way, making it useful for testing error-handling code
68* Fatal and non-fatal failures: \
69 You can specify whether a test failure should be treated as fatal or
70 non-fatal with Googletest, allowing tests to continue running even if a
71 failure occurs
72* Value-parameterized tests: \
73 Googletest supports value-parameterized tests, which run multiple times with
74 different input values, making it useful for testing functions that take
75 different inputs
76* Type-parameterized tests: \
77 Googletest also supports type-parameterized tests, which run with different
78 data types, making it useful for testing functions that work with different
79 data types
80* Various options for running tests: \
81 Googletest provides many options for running tests including running
82 individual tests, running tests in a specific order and running tests in
83 parallel
84
85## Supported Platforms
86
87GoogleTest follows Google's
88[Foundational C++ Support Policy](https://opensource.google/documentation/policies/cplusplus-support).
89See
90[this table](https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md)
91for a list of currently supported versions of compilers, platforms, and build
92tools.
93
94## Who Is Using GoogleTest?
95
96In addition to many internal projects at Google, GoogleTest is also used by the
97following notable projects:
98
99* The [Chromium projects](https://www.chromium.org/) (behind the Chrome
100 browser and Chrome OS).
101* The [LLVM](https://llvm.org/) compiler.
102* [Protocol Buffers](https://github.com/google/protobuf), Google's data
103 interchange format.
104* The [OpenCV](https://opencv.org/) computer vision library.
105
106## Related Open Source Projects
107
108[GTest Runner](https://github.com/nholthaus/gtest-runner) is a Qt5 based
109automated test-runner and Graphical User Interface with powerful features for
110Windows and Linux platforms.
111
112[GoogleTest UI](https://github.com/ospector/gtest-gbar) is a test runner that
113runs your test binary, allows you to track its progress via a progress bar, and
114displays a list of test failures. Clicking on one shows failure text. GoogleTest
115UI is written in C#.
116
117[GTest TAP Listener](https://github.com/kinow/gtest-tap-listener) is an event
118listener for GoogleTest that implements the
119[TAP protocol](https://en.wikipedia.org/wiki/Test_Anything_Protocol) for test
120result output. If your test runner understands TAP, you may find it useful.
121
122[gtest-parallel](https://github.com/google/gtest-parallel) is a test runner that
123runs tests from your binary in parallel to provide significant speed-up.
124
125[GoogleTest Adapter](https://marketplace.visualstudio.com/items?itemName=DavidSchuldenfrei.gtest-adapter)
126is a VS Code extension allowing to view GoogleTest in a tree view and run/debug
127your tests.
128
129[C++ TestMate](https://github.com/matepek/vscode-catch2-test-adapter) is a VS
130Code extension allowing to view GoogleTest in a tree view and run/debug your
131tests.
132
133[Cornichon](https://pypi.org/project/cornichon/) is a small Gherkin DSL parser
134that generates stub code for GoogleTest.
135
136## Contributing Changes
137
138Please read
139[`CONTRIBUTING.md`](https://github.com/google/googletest/blob/main/CONTRIBUTING.md)
140for details on how to contribute to this project.
141
142Happy testing!
143