Google Test (also known as gtest) is a
unit testing library for the
C++ programming language
C (''pronounced like the letter c'') is a general-purpose computer programming language. It was created in the 1970s by Dennis Ritchie, and remains very widely used and influential. By design, C's features cleanly reflect the capabilities of ...
, based on the
xUnit architecture.
[A quick introduction to the Google C++ Testing Framework]
Arpan Sen, IBM DeveloperWorks, 2010-05-11, retrieved 2016-04-12 The library is released under the
BSD 3-clause license. It can be compiled for a variety of
POSIX
The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming interf ...
and
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
platforms, allowing unit-testing of C sources as well as C++ with minimal source modification.
Projects using Google Test
Besides being developed and used at Google, many other projects implement Google Test as well:
*
Android Open Source Project
Android is a mobile operating system based on a modified version of the Linux kernel and other open-source software, designed primarily for touchscreen mobile devices such as smartphones and tablets. Android is developed by a consortium of ...
operating system
*
Chromium
Chromium is a chemical element with the symbol Cr and atomic number 24. It is the first element in group 6. It is a steely-grey, lustrous, hard, and brittle transition metal.
Chromium metal is valued for its high corrosion resistance and hardne ...
projects (behind the Chrome browser and ChromeOS)
*
LLVM
LLVM is a set of compiler and toolchain technologies that can be used to develop a front end for any programming language and a back end for any instruction set architecture. LLVM is designed around a language-independent intermediate represen ...
compiler
*
Protocol Buffers
Protocol Buffers (Protobuf) is a free and open-source cross-platform data format used to serialize structured data. It is useful in developing programs to communicate with each other over a network or for storing data. The method involves an int ...
(Google's data interchange format)
*
OpenCV computer vision library
*
Robot Operating System
*
Gromacs molecular dynamics simulation package
Related tools
Google Test UI is a test runner that runs test binary, allows to track progress via a progress bar, and displays a list of test failures. Google Test UI is written in
C#. Additionally, a feature-complete
Visual Studio
Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including web site, websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platfor ...
extension exists with Google Test Adapter.
See also
*
List of unit testing frameworks
*
CppUnit
References
Further reading
* {{cite book , last=Whittaker , first=James , title=How Google Tests Software , date=2012 , publisher=Pearson Education , location=Boston, Massachusetts , isbn=978-0-321-80302-3
External links
Google TestGoogle Test Primer documentationGtestC/C++ Conan package
A quick introduction to the Google C++ Testing Framework Arpan Sen, IBM DeveloperWorks, 2010-05-11
Anthony Vallone, 2014-01-21
C++ libraries
Extreme programming
Freedesktop.org
Unit testing frameworks
Software using the BSD license