Failing test information is missing

Issue #4 invalid
Kristupas Antanavicius created an issue

The store page shows a screenshot of failing test information being shown below the test's title. https://marketplace-cdn.atlassian.com/files/images/com.stellarity.bamboo.googletest-task/126e9fe5-0037-43dc-9224-5223458e0831.png

When I run tests that are failing, there is no information being shown. The gray section with "unknown file c++ exception with description.." is empty.

I have tried "run" and "parse" modes of the task, but they both seem create the same result. What I have noticed is that the output .xml file doesn't contain any such failure information. I have attached the output file.

Comments (9)

  1. Kristupas Antanavicius reporter

    I created a new empty test, ran it on my machine locally (not Bamboo) and the output .xml file is the same (failure message is empty string)

    TEST(MyTestClass, MyTestCase) { int a = 123; int b = 444; ASSERT_EQ(a, b); }

    <?xml version="1.0" encoding="UTF-8"?> <testsuites name="AllTests" tests="1" failures="1" disabled="0" errors="0" time="0.629" timestamp="2018-07-25T10:14:13"> <testsuite name="MyTestClass" tests="1" failures="1" disabled="0" errors="0" time="0.629" timestamp="2018-07-25T10:14:13"> <testcase name="MyTestCase" status="run" time="0.629" classname="MyTestClass"> <failure message="" type=""></failure> </testcase> </testsuite> </testsuites>

    <failure message=""> is not supposed to be empty, right? I'm thinking this could be an issue with the setup of gtest in the project.

  2. Sergey Podobry

    That's right, failure message shouldn't be empty. Here is my output:

    <?xml version="1.0" encoding="UTF-8"?>
    <testsuites tests="1" failures="1" disabled="0" errors="0" timestamp="2018-07-25T13:35:18" time="0.004" name="AllTests">
      <testsuite name="MyTestClass" tests="1" failures="1" disabled="0" errors="0" time="0.002">
        <testcase name="MyTestCase" status="run" time="0.001" classname="MyTestClass">
          <failure message="J:\Projects\Test\Test.cpp:7&#x0A;Expected equality of these values:&#x0A;  a&#x0A;    Which is: 123&#x0A;  b&#x0A;    Which is: 444" type=""><![CDATA[J:\Projects\Test\Test.cpp:7
    Expected equality of these values:
      a
        Which is: 123
      b
        Which is: 444]]></failure>
        </testcase>
      </testsuite>
    </testsuites>
    
  3. Kristupas Antanavicius reporter

    Yes. The project I'm working on (Chromium) has fancy concurrent job model (cross-process). The output files that I was getting were not the actual files produced by GTEST code. The log files were being generated by Chromium's code by merging the results from multiple concurrent jobs. The 'message' part was not being included in the final log file that I was getting.

  4. Log in to comment