Google Test

{{Short description|C++ testing framework by Google}}

{{Multiple issues|

{{third-party|date=August 2013}}

{{tone|date=June 2016}}

{{Advert|date=October 2019}}

}}

{{Infobox software

| name = Google Test

| developer = Google

| latest release version = 1.14.0[https://github.com/google/googletest/releases/tag/v1.14.0 Google Test v1.14.0 release notes], retrieved 2023-11-29

| latest release date = {{Start date and age|2023|08|02}}

| repo = {{URL|https://github.com/google/googletest/}}

| operating system = Linux, Microsoft Windows, macOS

| programming language = C++

| genre = Unit testing tool

| license = BSD 3-clauses

}}

Google Test, often referred to as gtest, is a specialized library utilized to conduct unit testing in the C++ programming language. This library operates under the terms of the BSD 3-clause license.[https://github.com/google/googletest Google Test's repository], retrieved 2016-04-12, cites [http://opensource.org/licenses/BSD-3-Clause New BSD] as license. The license file is at {{URL|https://github.com/google/googletest/blob/master/googletest/LICENSE}} Google Test is based on the xUnit architecture, a systematic methodology for assessing software components.[https://web.archive.org/web/20160316134644/http://www.ibm.com/developerworks/aix/library/au-googletestingframework.html A quick introduction to the Google C++ Testing Framework], Arpan Sen, IBM DeveloperWorks, 2010-05-11, retrieved 2016-04-12

Google Test can be compiled for a diverse range of computer systems, encompassing those employing POSIX, a set of standard operating system interfaces, as well as the Microsoft Windows platform. This adaptability facilitates the execution of unit tests on both C and C++ codebases, with minimal alterations required in the source code{{Citation needed|date=January 2024}}.

Projects using Google Test

Besides being developed and used at Google, many other projects implement Google Test as well:

  • Android Open Source Project operating system[https://source.android.com/compatibility/tests/development/native-func-e2e Android Native tests]
  • Chromium projects (behind the Chrome browser and ChromeOS)
  • LLVM compiler
  • Protocol Buffers (Google's data interchange format)
  • OpenCV computer vision library
  • Robot Operating System[https://docs.ros.org/en/humble/Concepts/About-Build-System.html?highlight=gtest#the-ament-cmake-repository The ament_cmake Repository]
  • Gromacs molecular dynamics simulation package[http://manual.gromacs.org/documentation/5.1/dev-manual/testutils.html#unit-testing-framework Gromacs Testing Framework]

Related tools

Google Test UI is a software tool for testing computer programs, and serves as a test runner. It employs a 'test binary', a compiled program responsible for executing tests and analyzing their results, to evaluate software functionality. It visually presents the testing progress through a progress bar and displays a list of identified issues or 'test failures'. The tool is primarily written in C#.[https://github.com/ospector/gtest-gbar Google Test UI] retrieved 2016-04-12 A Visual Studio extension, Google Test Adapter, complements its functionality within the Visual Studio environment.{{Cite web |last=Soltenborn |first=Christian |date=12 August 2022 |title=GoogleTestAdapter |url=https://github.com/csoltenborn/GoogleTestAdapter |website=GitHub}}

See also

{{Portal|Free and open-source software}}

References

{{Reflist}}

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}}