Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51790

Support GTest Disabled Tests in Junit Plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      GTest has the notion of disabled tests.  It shows them in xml with a summation of disabled tests in the testsuite section and a status="notrun" attribute on each test case.  It would be very nice either a disabled tests (similar to pass, fail, skip) was aded or disabled tests were marked as skipped tests.  Below is an example of some disabled tests and how the xml format of GTest would show them in version 1.8.0 of the GTest library.

      <?xml version="1.0" encoding="UTF-8"?>
      <testsuites tests="33" failures="0" disabled="26" errors="0" timestamp="2018-06-07T17:05:18" time="0.002" name="AllTests">
      <testsuite name="Object" tests="15" failures="0" disabled="15" errors="0" time="0">
      <testcase name="DISABLED_Attribute" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_ObjectConstructor" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_SetClassification" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_SetMultipleClassification" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_GetAttributeNames" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_AddAttribute" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_AttributeLimitNumber" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_UpdateAttribute" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_GetAttribute" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_RemoveAttribute" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_GetSetPose" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_GetSetVelocity" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_GetSetAcceleration" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_GetSet3DBoundingBox" status="notrun" time="0" classname="Object" />
      <testcase name="DISABLED_GetSet2DBoundingBox" status="notrun" time="0" classname="Object" />
      </testsuite>
      <testsuite name="Roadgraph" tests="18" failures="0" disabled="11" errors="0" time="0.002">
      <testcase name="DISABLED_GetSetSpeedLimit" status="notrun" time="0" classname="Roadgraph" />
      <testcase name="DeleteSpeedLimit" status="run" time="0.001" classname="Roadgraph" />
      <testcase name="GetSetMinSpeedLimit" status="run" time="0" classname="Roadgraph" />
      <testcase name="DeleteMinSpeedLimit" status="run" time="0" classname="Roadgraph" />
      <testcase name="GetSetRoadAccessType" status="run" time="0" classname="Roadgraph" />
      <testcase name="DISABLED_DeleteRoadAccessType" status="notrun" time="0" classname="Roadgraph" />
      <testcase name="GetSetCenterLine" status="run" time="0" classname="Roadgraph" />
      <testcase name="DISABLED_DeleteCenterLine" status="notrun" time="0" classname="Roadgraph" />
      <testcase name="DISABLED_GetSetLeftLaneBoundsGeometry" status="notrun" time="0" classname="Roadgraph" />
      <testcase name="DISABLED_DeleteLeftLaneBoundsGeometry" status="notrun" time="0" classname="Roadgraph" />
      <testcase name="DISABLED_GetSetLeftLaneBoundsMeaning" status="notrun" time="0" classname="Roadgraph" />
      <testcase name="DISABLED_DeleteLeftLaneBoundsMeaning" status="notrun" time="0" classname="Roadgraph" />
      <testcase name="DISABLED_GetSetRightLaneBoundsGeometry" status="notrun" time="0" classname="Roadgraph" />
      <testcase name="DISABLED_DeleteRightLaneBoundsGeometry" status="notrun" time="0" classname="Roadgraph" />
      <testcase name="DISABELD_GetSetRightLaneBoundsMeaning" status="run" time="0" classname="Roadgraph" />
      <testcase name="DISABLED_DeleteRightLaneBoundsMeaning" status="notrun" time="0" classname="Roadgraph" />
      <testcase name="GetLaneWidth" status="run" time="0.001" classname="Roadgraph" />
      <testcase name="DISABLED_RoadgraphTypes" status="notrun" time="0" classname="Roadgraph" />
      </testsuite>
      </testsuites>
      

        Attachments

          Activity

          Hide
          uday22 uday kumar added a comment -

          JUnit Plugin is not parsing the disabled tests, when status="notrun" it should parse skipped= true. because of this the count of the passed tests is wrong. currently Pass Tests count = Pass Tests + Skipped Tests. Please correct the parsing logic in the Plugin. 

          Show
          uday22 uday kumar added a comment - JUnit Plugin is not parsing the disabled tests, when status="notrun" it should parse skipped= true. because of this the count of the passed tests is wrong. currently Pass Tests count = Pass Tests + Skipped Tests. Please correct the parsing logic in the Plugin. 

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            spenser309 Spenser Gilliland
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: