Google Testing Blog has announced the launch of googletest the Google C++ Testing Framework. The framework is useful for writing automated tests to cover your code. Google’s framework for writing C++ tests on a variety of platforms (Linux, Mac OS X, Windows, Windows CE, and Symbian).
Based on the xUnit architecture. Supports automatic test discovery, a rich set of assertions, user-defined assertions, death tests, fatal and non-fatal failures, various options for running the tests, and XML test report generation.
Some of the features of this testing framework are:
- Google Test is portable: it works on a variety of platforms (Linux, Windows, Mac OS X, and more), with several versions of GCC and MSVC compilers, and with or without exceptions. You can even use it in embedded systems like Windows CE and Symbian. Build tools and test runners for many of these are under active development, with Linux Autotools support already in place.
- It supports both fatal and nonfatal assertions. The test will continue after a nonfatal failure. This allows more problems to be uncovered and fixed in a single edit-compile-test cycle.
- It provides many assertions for common testing needs, and lets you easily define new assertions for less common cases.
- On Linux, you can write death tests to ensure that your code crashes with expected errors.
- Because it’s based on the popular xUnit architecture, Google Test is easy to learn if you’ve used any testing framework in this family before.
The link here covers the basics of Google C++ Testing framework. Go ahead and give it a shot.
Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.