googletest icon indicating copy to clipboard operation
googletest copied to clipboard

Question about generate XML report

Open dlc1994 opened this issue 3 years ago • 3 comments
trafficstars

how to generate a XML file consisting all test cases

  1. I've tried export GTEST_OUTPUT=xxx.xml, but the xml file was overwritten
  2. if not specify xml file name, there are many XML files generated.

dlc1994 avatar Mar 21 '22 08:03 dlc1994

Can you be more specific about what you are trying to do? Are you running multiple tests binaries? Please tell us more about what you are doing and what you expect to see.

derekmauro avatar Mar 21 '22 19:03 derekmauro

Can you be more specific about what you are trying to do? Are you running multiple tests binaries? Please tell us more about what you are doing and what you expect to see.

Ok I have integrated gtest in my cmake probject, built many unittest cases. Then I have multiple tests binaries, in general I run ctest then all test cases will run without generating any report. I want to generate one XML file with all reports of all testcases in it. Unfortunately, I can use ./somecase --getst_output="xml" to generate a XML file with only this case; and I have tried to export the Macro GTEST_OUTPUT=xxx.xml, the result will be overwritten.

dlc1994 avatar Mar 22 '22 01:03 dlc1994

@dlc1994 If you use

GTEST_OUTPUT="xml:$PWD/" it will generate multiple *.xml files without overriding.

nwrkbiz avatar May 23 '24 12:05 nwrkbiz