简体   繁体   中英

Google Mocks test output to XML not working

I have been using Google Test for a few months now and I have

--gtest_output=xml:$(TargetDir)\$(SolutionName).unittest.results.$

(Configuration).xml

as command Arguments in the VS2010 Test project. This has been working to output the test results to xml.

I now have been adding in Google Mocks and I have the tests working and Google Mocks working, but now I don't get the test result in a file. How do I get the XML file of the test results and mock results?

I have not been able to find any information on this.

Turns out that one of my mock functions was not returning a valid value and the test application was exiting before the XML file was generated. After I fixed my Unit Test that need this extra setup on the mocked function. The Unit Tests all complete and the XML file is generated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM