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

Testreport lacks of those test in which the hashcode of two different testsuite name coincide

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.89.2
      xUnit-Version: 1.102
      Jdk:1.8.0_151
      Os: Ubuntu 14.04.5 LTS
    • Similar Issues:

      Description

      The published testreport generated by xunit is wrong, if two testname files will result in the same hashcode.

      the class org.jenkinsci.plugins.xunit.service.XUnitConversionService uses the following logic, to create temporarily junit-xml files:

      File junitTargetFile = new File(parent, JUNIT_FILE_PREFIX + inputFile.hashCode() + JUNIT_FILE_POSTFIX);

      in my project, i have two Testclasses that produce the same hash-code.

      de.congstar.acceptancetests.aax.templates.komplett.EKOM02XTest
      de.congstar.acceptancetests.aax.templates.komplett.EKOM039Test

      the temp. generated junit-file for both source junit xml files was:
      generatedJUnitFiles/JUnit/TEST-747423851.xml

      that occurrs only on the jenkins server that runs on linux - on my local windows pc, the hashcollision does not occurr.

      as a result of this name-clash only the results of the last Testclass is reported to jenkins.

        Attachments

          Activity

          sascha_friederich Sascha Friederich created issue -
          sascha_friederich Sascha Friederich made changes -
          Field Original Value New Value
          Description The published testreport generated by xunit is wrong, if two testname files will result in the same hashcode.

          the class XUnitConversionService uses the following logic, to create temporarily junit-xml files:
          {code:java}
          File junitTargetFile = new File(parent, JUNIT_FILE_PREFIX + inputFile.hashCode() + JUNIT_FILE_POSTFIX);{code}
          in my project, i have two Testklasses that produce the same hash-code:

          de.congstar.acceptancetests.aax.templates.komplett.EKOM02XTest
           de.congstar.acceptancetests.aax.templates.komplett.EKOM039Test

          the generated junit-file was:
           generatedJUnitFiles/JUnit/TEST-747423851.xml

          as a result of this name-clash only the last Testclass is reported to jenkins.
          The published testreport generated by xunit is wrong, if two testname files will result in the same hashcode.

          the class XUnitConversionService uses the following logic, to create temporarily junit-xml files:
          {code:java}
          File junitTargetFile = new File(parent, JUNIT_FILE_PREFIX + inputFile.hashCode() + JUNIT_FILE_POSTFIX);{code}
          in my project, i have two Testclasses that produce the same hash-code.

          de.congstar.acceptancetests.aax.templates.komplett.EKOM02XTest
           de.congstar.acceptancetests.aax.templates.komplett.EKOM039Test

          the generated junit-file was:
           generatedJUnitFiles/JUnit/TEST-747423851.xml

          that occurrs only on the jenkins server that runs on linux - on my local windows pc, the hashcollision does not occurr.

          as a result of this name-clash only the results of the last Testclass is reported to jenkins.
          sascha_friederich Sascha Friederich made changes -
          Description The published testreport generated by xunit is wrong, if two testname files will result in the same hashcode.

          the class XUnitConversionService uses the following logic, to create temporarily junit-xml files:
          {code:java}
          File junitTargetFile = new File(parent, JUNIT_FILE_PREFIX + inputFile.hashCode() + JUNIT_FILE_POSTFIX);{code}
          in my project, i have two Testclasses that produce the same hash-code.

          de.congstar.acceptancetests.aax.templates.komplett.EKOM02XTest
           de.congstar.acceptancetests.aax.templates.komplett.EKOM039Test

          the generated junit-file was:
           generatedJUnitFiles/JUnit/TEST-747423851.xml

          that occurrs only on the jenkins server that runs on linux - on my local windows pc, the hashcollision does not occurr.

          as a result of this name-clash only the results of the last Testclass is reported to jenkins.
          The published testreport generated by xunit is wrong, if two testname files will result in the same hashcode.

          the class {{org.jenkinsci.plugins.xunit.service.XUnitConversionService}} uses the following logic, to create temporarily junit-xml files:
          {code:java}
          File junitTargetFile = new File(parent, JUNIT_FILE_PREFIX + inputFile.hashCode() + JUNIT_FILE_POSTFIX);{code}
          in my project, i have two Testclasses that produce the same hash-code.

          de.congstar.acceptancetests.aax.templates.komplett.EKOM02XTest
           de.congstar.acceptancetests.aax.templates.komplett.EKOM039Test

          the generated junit-file was:
           generatedJUnitFiles/JUnit/TEST-747423851.xml

          that occurrs only on the jenkins server that runs on linux - on my local windows pc, the hashcollision does not occurr.

          as a result of this name-clash only the results of the last Testclass is reported to jenkins.
          sascha_friederich Sascha Friederich made changes -
          Summary wrong testreport, if testnames result in same hashcode (because of temp. generated junit-files) wrong testreport, if testnames produce a hashcollision (because of temp. generated junit-files)
          sascha_friederich Sascha Friederich made changes -
          Description The published testreport generated by xunit is wrong, if two testname files will result in the same hashcode.

          the class {{org.jenkinsci.plugins.xunit.service.XUnitConversionService}} uses the following logic, to create temporarily junit-xml files:
          {code:java}
          File junitTargetFile = new File(parent, JUNIT_FILE_PREFIX + inputFile.hashCode() + JUNIT_FILE_POSTFIX);{code}
          in my project, i have two Testclasses that produce the same hash-code.

          de.congstar.acceptancetests.aax.templates.komplett.EKOM02XTest
           de.congstar.acceptancetests.aax.templates.komplett.EKOM039Test

          the generated junit-file was:
           generatedJUnitFiles/JUnit/TEST-747423851.xml

          that occurrs only on the jenkins server that runs on linux - on my local windows pc, the hashcollision does not occurr.

          as a result of this name-clash only the results of the last Testclass is reported to jenkins.
          The published testreport generated by xunit is wrong, if two testname files will result in the same hashcode.

          the class {{org.jenkinsci.plugins.xunit.service.XUnitConversionService}} uses the following logic, to create temporarily junit-xml files:
          {code:java}
          File junitTargetFile = new File(parent, JUNIT_FILE_PREFIX + inputFile.hashCode() + JUNIT_FILE_POSTFIX);{code}
          in my project, i have two Testclasses that produce the same hash-code.

          de.congstar.acceptancetests.aax.templates.komplett.EKOM02XTest
           de.congstar.acceptancetests.aax.templates.komplett.EKOM039Test

          the temp. generated junit-file for *both* source junit xml files was:
           generatedJUnitFiles/JUnit/TEST-747423851.xml

          that occurrs only on the jenkins server that runs on linux - on my local windows pc, the hashcollision does not occurr.

          as a result of this name-clash only the results of the last Testclass is reported to jenkins.
          sascha_friederich Sascha Friederich made changes -
          Assignee Andrew Bayer [ abayer ] Gregory Boissinot [ gbois ]
          sascha_friederich Sascha Friederich made changes -
          Assignee Gregory Boissinot [ gbois ] Nikolas Falco [ nfalco79 ]
          nfalco Nikolas Falco made changes -
          Assignee Nikolas Falco [ nfalco79 ] Nikolas Falco [ nfalco ]
          nfalco Nikolas Falco made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          nfalco Nikolas Falco made changes -
          Summary wrong testreport, if testnames produce a hashcollision (because of temp. generated junit-files) Testreport lacks of those test in which the hashcode of two different testsuite name coincide
          nfalco Nikolas Falco made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          nfalco Nikolas Falco made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              nfalco Nikolas Falco
              Reporter:
              sascha_friederich Sascha Friederich
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: