Giter Club home page Giter Club logo

googletest's Introduction

Welcome to Google Test, Google's C++ test framework!

This GitHub 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.

GoogleTest

Based on the XUnit architecture. Supports automatic test discovery, a rich set of assertions, user-defined assertions, death tests, fatal and non-fatal failures, value- and type-parameterized tests, various options for running the tests, and XML test report generation.

Platforms

Google test has been used on a variety of platforms:

  • Linux
  • Mac OS X
  • Windows
  • Cygwin
  • MinGW
  • Windows Mobile
  • Symbian

Who Is Using Google Test?

In addition to many internal projects at Google, Google Test is also used by the following notable projects:

Google Test-related open source projects

Google Test UI is test runner that runs your test binary, allows you to track its progress via a progress bar, and displays a list of test failures. Clicking on one shows failure text. Google Test UI is written in C#.

GTest TAP Listener is an event listener for Google Test that implements the TAP protocol for test result output. If your test runner understands TAP, you may find it useful.

About Google Mock

Google Mock is an extension to Google Test for writing and using C++ mock classes. It is inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s specifics in mind.

Google mock:

  • lets you create mock classes trivially using simple macros.
  • supports a rich set of matchers and actions.
  • handles unordered, partially ordered, or completely ordered expectations.
  • is extensible by users.

We hope you find it useful!

Using Google Mock Without Google Test

Google Mock is not a testing framework itself. Instead, it needs a testing framework for writing tests. Google Mock works seamlessly with Google Test, butj you can also use it with any C++ testing framework.

Getting Started

If you are new to the project, we suggest that you read the user documentation in the following order:

You can also watch Zhanyong's talk on Google Mock's usage and implementation.

Once you understand the basics, check out the rest of the docs:

  • CheatSheet - all the commonly used stuff at a glance.
  • CookBook - recipes for getting things done, including advanced techniques.

If you need help, please check the KnownIssues and FrequentlyAskedQuestions before posting a question on the googlemock discussion group.

We'd love to have your help! Please read the Developer Guides if you are willing to contribute to the development.

Happy mocking!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.