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
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. |
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. |
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) |
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. |
Assignee | Andrew Bayer [ abayer ] | Gregory Boissinot [ gbois ] |
Assignee | Gregory Boissinot [ gbois ] | Nikolas Falco [ nfalco79 ] |
Assignee | Nikolas Falco [ nfalco79 ] | Nikolas Falco [ nfalco ] |
Priority | Major [ 3 ] | Minor [ 4 ] |
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 |
Status | Open [ 1 ] | In Progress [ 3 ] |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Resolved [ 5 ] |
it took some amount of time, to track down the problem - could just anyone take a look at this issue?