Generate Google C++ Unit Test XML Report

Neophile picture Neophile · Nov 25, 2011 · Viewed 44.4k times · Source

I am new to using Google test framework for unit testing and am intending to generate an XML report of the tests or the command output as a report (I could just print it obviously). I have read up on Generate XML Report , but haven't been able to understand clearly on how to go about generating the report. Any help would be greatly appreciated.

Cheers.

Answer

v01d picture v01d · Nov 25, 2011

For Linux environments:

It's simple you just have to set the GTEST_OUTPUT environment variable like this: export GTEST_OUTPUT="xml:/home/user/src". or use the -gtest_output flag set the same way.