Friday, July 4, 2008

First Look: Google Test Framework Simplifies Testing

Software Testing is probably one of the most boring and tedious task to a lot of people, but there are still people like me who love writing unit tests. But GoogleTesting among a lot of developers I know, its always the guys from lower-part of the food-chain that write tests. Google has something for testers that will surely make them happy. Google announced today a new Google Testing Framework (GTF) in their Testing Blog.

GTF is a new testing framework for programs written in C++ that Google has open-sourced today. It is a collection of libraries that Google previously used to test their own softwares, but I’m wondering how that could be true, considering Python is Google’s favorite language!! ;-)

But jokes apart, as soon as the new testing framework was released, I set out with a few of my colleagues to test out the framework. We are one of those guys who are excited about testing and ways to simplify testing. The first thing we noticed even before starting with the library was that it was compatible with a host of compilers and versions. We’ve seen a few test frameworks for specific compilers or platforms, but GTF supports Linux, Windows, OSX and host of compilers ranging from gcc to Microsoft’s VC++.

Another excellent thing about the framework was that it’s easy to learn the basics as well has advanced features. Its very similar to xUnit tests and has good features to compare with CppUnit. The basics can be learnt from here and the advanced guide is here. Predicate Assertions are probably one of my favorite features, that we encountered quickly in a program that we were having trouble to debug. There are also a host of other assertions available and we’ve not got into very deep with all the assertions. But from the initial look at the framework, most of us very ranking it as one of the best testing frameworks out there...

There is still some of us who think Boost Framework is very good and some still think Visual Assist plugin tool (of Visual Studio fame) is pretty good. But the first look at Google Testing Framework has definitely made us stand up!

7 comments:

Anonymous said...

Thank you for sharing your impressions on Google Test Framework.
BTW, as I know, Google uses three preffered programming languages - Java, C++, Python.

Anonymous said...

What's the connection between VAX and testing?

Saptarshi Purkayastha said...

@tom: Is there a connection between them?? I sure would want to know the connection... VAX I thought was that VMS running computer which my great grandfather owned when it was still DEC!! ;-)

Anonymous said...

VAX == Visual Assist X

Anonymous said...

can someone tell me in step by step how to integrate google test framework in to my exisiting source for both visual studio and linux

Anonymous said...

Good Job! :)

Anonymous said...

GoogleTest Add-in for Visual Studio at http://googletestaddin.codeplex.com/