Jenkins and plugins versions report
Jenkins 2.492.1
What Operating System are you using (both controller, and any agents involved in the problem)?
Ubuntu
Reproduction steps
Process this following test results file:
<testsuites>
<testsuite name="MyTestAssembly.dll" tests="3" skipped="0" failures="0" errors="0" time="0.0039629999999999995" timestamp="2025-03-11T15:09:45" hostname="jenkins-worker5" id="0" package="MyTestAssembly.dll">
<properties/>
<testcase classname="MyTestAssembly.Tests.JUnit.JunitPluginTests" name="TestCase1" time="0.0033490">
<system-out><![CDATA[I am TestCase1
[[ATTACHMENT|C:\Users\MyUser\source\repos\forks\junit-attachments-plugin\work\workspace\ann-build-old\TestCase1\Attachment.txt]]
[[ATTACHMENT|C:\Users\MyUser\source\repos\forks\junit-attachments-plugin\work\workspace\ann-build-old\TestCase1\Nested\Attachment.txt]]
]]></system-out>
</testcase>
<testcase classname="MyTestAssembly.Tests.JUnit.JunitPluginTests" name="TestCase2" time="0.0004200">
<system-out><![CDATA[I am TestCase2
[[ATTACHMENT|C:\Users\MyUser\source\repos\forks\junit-attachments-plugin\work\workspace\ann-build-old\TestCase2\Attachment.txt]]
]]></system-out>
</testcase>
<testcase classname="MyTestAssembly.Tests.JUnit.JunitPluginTests" name="TestCase3" time="0.0001940">
<system-out><![CDATA[I am TestCase3
[[ATTACHMENT|C:\Users\MyUser\source\repos\forks\junit-attachments-plugin\work\workspace\ann-build-old\TestCase3\Attachment.txt]]
]]></system-out>
</testcase>
<system-out/>
<system-err/>
</testsuite>
</testsuites>
Note that for TestCase1 the attachment under the \Nested directory is not included in the results because it has the same filename as the other attachment for this test case.
Expected Results
Both files should be kept and processed. Perhaps we need to set the attachment 'name/key' as the path relative to the lowest level common sub-directory of the attachments so we can maintain this filesystem structure for the attachments?
Actual Results
Only one attachment is kept and displayed
Anything else?
No response
Are you interested in contributing a fix?
Yes, if I have the time
Jenkins and plugins versions report
Jenkins 2.492.1
What Operating System are you using (both controller, and any agents involved in the problem)?
Ubuntu
Reproduction steps
Process this following test results file:
Note that for TestCase1 the attachment under the \Nested directory is not included in the results because it has the same filename as the other attachment for this test case.
Expected Results
Both files should be kept and processed. Perhaps we need to set the attachment 'name/key' as the path relative to the lowest level common sub-directory of the attachments so we can maintain this filesystem structure for the attachments?
Actual Results
Only one attachment is kept and displayed
Anything else?
No response
Are you interested in contributing a fix?
Yes, if I have the time