README.md 4.39 KB
Newer Older
1
# GoogleTest
2

Abseil Team's avatar
Abseil Team committed
3
#### OSS Builds Status
Billy Donahue's avatar
Billy Donahue committed
4

Gennadiy Civil's avatar
Gennadiy Civil committed
5
[![Build status](https://ci.appveyor.com/api/projects/status/4o38plt0xbo1ubc8/branch/master?svg=true)](https://ci.appveyor.com/project/GoogleTestAppVeyor/googletest/branch/master)
Billy Donahue's avatar
Billy Donahue committed
6

Abseil Team's avatar
Abseil Team committed
7
### Announcements
Gennadiy Civil's avatar
Gennadiy Civil committed
8

misterg's avatar
misterg committed
9
#### Release 1.10.x
Gennadiy Civil's avatar
Gennadiy Civil committed
10

misterg's avatar
misterg committed
11
12
[Release 1.10.x](https://github.com/google/googletest/releases/tag/release-1.10.0)
is now available.
13

misterg's avatar
misterg committed
14
#### Coming Soon
15

misterg's avatar
misterg committed
16
17
18
19
*   Post 1.10.x googletest will follow
    [Abseil Live at Head philosophy](https://abseil.io/about/philosophy)
*   We are also planning to take a dependency on
    [Abseil](https://github.com/abseil/abseil-cpp).
Gennadiy Civil's avatar
Gennadiy Civil committed
20

21
## Welcome to **GoogleTest**, Google's C++ test framework!
Gennadiy Civil's avatar
Gennadiy Civil committed
22
23
24
25
26

This repository is a merger of the formerly separate GoogleTest and GoogleMock
projects. These were so closely related that it makes sense to maintain and
release them together.

Abseil Team's avatar
Abseil Team committed
27
### Getting Started
Gennadiy Civil's avatar
Gennadiy Civil committed
28

29
The information for **GoogleTest** is available in the
Patryk Obara's avatar
Patryk Obara committed
30
[GoogleTest Primer](docs/primer.md) documentation.
31

32
33
**GoogleMock** is an extension to GoogleTest for writing and using C++ mock
classes. See the separate [GoogleMock documentation](googlemock/README.md).
Billy Donahue's avatar
Billy Donahue committed
34

Gennadiy Civil's avatar
Gennadiy Civil committed
35
36
More detailed documentation for googletest is in its interior
[googletest/README.md](googletest/README.md) file.
Billy Donahue's avatar
Billy Donahue committed
37

Gennadiy Civil's avatar
Gennadiy Civil committed
38
## Features
Billy Donahue's avatar
Billy Donahue committed
39

Gennadiy Civil's avatar
Gennadiy Civil committed
40
41
42
43
44
45
46
47
48
49
*   An [xUnit](https://en.wikipedia.org/wiki/XUnit) test framework.
*   Test discovery.
*   A rich set of assertions.
*   User-defined assertions.
*   Death tests.
*   Fatal and non-fatal failures.
*   Value-parameterized tests.
*   Type-parameterized tests.
*   Various options for running the tests.
*   XML test report generation.
50

Abseil Team's avatar
Abseil Team committed
51
## Supported Platforms
52

Abseil Team's avatar
Abseil Team committed
53
54
55
56
57
58
59
60
61
62
63
64
65
GoogleTest requires a codebase and compiler compliant with the C++11 standard or
newer.

The GoogleTest code is officially supported on the following platforms.
Operating systems or tools not listed below are community-supported. For
community-supported platforms, patches that do not complicate the code may be
considered.

If you notice any problems on your platform, please file an issue on the
[GoogleTest GitHub Issue Tracker](https://github.com/google/googletest/issues).
Pull requests containing fixes are welcome!

### Operating Systems
66

Gennadiy Civil's avatar
Gennadiy Civil committed
67
*   Linux
Abseil Team's avatar
Abseil Team committed
68
*   macOS
Gennadiy Civil's avatar
Gennadiy Civil committed
69
*   Windows
Abseil Team's avatar
Abseil Team committed
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

### Compilers

*   gcc 5.0+
*   clang 5.0+
*   MSVC 2015+

**macOS users:** Xcode 9.3+ provides clang 5.0+.

### Build Systems

*   [Bazel](https://bazel.build/)
*   [CMake](https://cmake.org/)

**Note:** Bazel is the build system used by the team internally and in tests.
CMake is supported on a best-effort basis and by the community.
86

87
## Who Is Using GoogleTest?
88

89
In addition to many internal projects at Google, GoogleTest is also used by the
Gennadiy Civil's avatar
Gennadiy Civil committed
90
following notable projects:
91

Gennadiy Civil's avatar
Gennadiy Civil committed
92
93
94
95
*   The [Chromium projects](http://www.chromium.org/) (behind the Chrome browser
    and Chrome OS).
*   The [LLVM](http://llvm.org/) compiler.
*   [Protocol Buffers](https://github.com/google/protobuf), Google's data
Billy Donahue's avatar
Billy Donahue committed
96
    interchange format.
Gennadiy Civil's avatar
Gennadiy Civil committed
97
*   The [OpenCV](http://opencv.org/) computer vision library.
98

Gennadiy Civil's avatar
Gennadiy Civil committed
99
## Related Open Source Projects
100

Gennadiy Civil's avatar
Gennadiy Civil committed
101
102
103
[GTest Runner](https://github.com/nholthaus/gtest-runner) is a Qt5 based
automated test-runner and Graphical User Interface with powerful features for
Windows and Linux platforms.
104

105
[GoogleTest UI](https://github.com/ospector/gtest-gbar) is a test runner that
Gennadiy Civil's avatar
Gennadiy Civil committed
106
runs your test binary, allows you to track its progress via a progress bar, and
Billy Donahue's avatar
Billy Donahue committed
107
108
displays a list of test failures. Clicking on one shows failure text. Google
Test UI is written in C#.
109

Billy Donahue's avatar
Billy Donahue committed
110
[GTest TAP Listener](https://github.com/kinow/gtest-tap-listener) is an event
111
listener for GoogleTest that implements the
112
[TAP protocol](https://en.wikipedia.org/wiki/Test_Anything_Protocol) for test
Billy Donahue's avatar
Billy Donahue committed
113
result output. If your test runner understands TAP, you may find it useful.
114

115
116
117
[gtest-parallel](https://github.com/google/gtest-parallel) is a test runner that
runs tests from your binary in parallel to provide significant speed-up.

Gennadiy Civil's avatar
Gennadiy Civil committed
118
[GoogleTest Adapter](https://marketplace.visualstudio.com/items?itemName=DavidSchuldenfrei.gtest-adapter)
119
120
is a VS Code extension allowing to view GoogleTest in a tree view, and run/debug
your tests.
David Schuldenfrei's avatar
David Schuldenfrei committed
121

122
[C++ TestMate](https://github.com/matepek/vscode-catch2-test-adapter) is a VS
123
Code extension allowing to view GoogleTest in a tree view, and run/debug your
124
tests.
David Schuldenfrei's avatar
David Schuldenfrei committed
125

126
[Cornichon](https://pypi.org/project/cornichon/) is a small Gherkin DSL parser
127
that generates stub code for GoogleTest.
128

Abseil Team's avatar
Abseil Team committed
129
## Contributing Changes
130

Abseil Team's avatar
Abseil Team committed
131
Please read [`CONTRIBUTING.md`](CONTRIBUTING.md) for details on how to
Gennadiy Civil's avatar
Gennadiy Civil committed
132
contribute to this project.
133

Billy Donahue's avatar
Billy Donahue committed
134
Happy testing!