robercano / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

XML test report is not generated when exception handling is enabled. #325

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set command line to "--gtest_output=xml --gtest_throw_on_failure 
--gtest_catch_exceptions"
2. Make a test fail
3. XML output is not generated/updated.

What is the expected output? What do you see instead?
I expected an xml report with the offending test in failed state.
The XML file is not generated/updated.

What version of Google Test are you using? On what operating system?
1.5.0 on Windows XP (2002, Service pack 3).

Please provide any additional information below, such as a code snippet.
#include "gtest/gtest.h"

TEST(TestOutput, TestFailure) {
  EXPECT_EQ(2, 1);
}

int main(int argc, char* argv[]) {
    ::testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}

Original issue reported on code.google.com by SytseRei...@gmail.com on 24 Oct 2010 at 12:19

GoogleCodeExporter commented 9 years ago
This is working as expected. The --gtest_throw_on_failure option is designed to 
make Google Test report a failure to another testing framework (see 
http://code.google.com/p/googletest/wiki/AdvancedGuide#Letting_Another_Testing_F
ramework_Drive). When you use it, that framework is expected to take care of 
logging failures.

Original comment by vladlosev on 24 Oct 2010 at 8:55