jenkinsci / jenkinsci/junit-plugin
[JENKINS-49832] The hyperlink to a JUnit Test report subpage for a test group named "run" thinks it is the build information link
- Dominant language
- Java
- Stars
- 87
- Forks
- 351
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 2
Description
Given this build definition:
cat < test.files.run.xml
'1.0' encoding='UTF-8'?>
"iMac2016.local" name="test.files.run" tests="2" errors="0" failures="0" skipped="0" time="2.996">
"test.files.run" name="constant-optimization.scala" time="2.888">
"test.files.run" name="groupby.scala" time="2.996">
EOF
cat < test.files.run2.xml
'1.0' encoding='UTF-8'?>
"iMac2016.local" name="test.files.run2" tests="2" errors="0" failures="0" skipped="0" time="2.996">
"test.files.run2" name="constant-optimization.scala" time="2.888">
"test.files.run2" name="groupby.scala" time="2.996">
EOF
The test report page http://localhost:8080/job/junit-reporter-bug/3/testReport/test.files/
The "run" link has leads to "http://localhost:8080/job/junit-reporter-bug/3/testReport/test.files/run/" but this displays "Build #3 / No Changes / Started By User etc".
The "run2" link works as expected.
In my broader data set, I only noticed this for the name "run". Perhaps the problem is the UI toolkit rather than pages generated by the junit-plugin, I can't spot a difference between the working and broken links when inspecting the HTML
---
Originally reported by retronym, imported from: The hyperlink to a JUnit Test report subpage for a test group named "run" thinks it is the build information link
Raw content of original issue
Given this build definition:
cat <<EOF > test.files.run.xml
<?xml version='1.0' encoding='UTF-8'?>
<testsuite hostname="iMac2016.local" name="test.files.run" tests="2" errors="0" failures="0" skipped="0" time="2.996">
<properties></properties><testcase classname="test.files.run" name="constant-optimization.scala" time="2.888">
<system-out>
</system-out>
<system-err>
</system-err>
</testcase><testcase classname="test.files.run" name="groupby.scala" time="2.996">
<system-out>
</system-out>
<system-err>
</system-err>
</testcase>
</testsuite>
EOFcat <<EOF > test.files.run2.xml
<?xml version='1.0' encoding='UTF-8'?>
<testsuite hostname="iMac2016.local" name="test.files.run2" tests="2" errors="0" failures="0" skipped="0" time="2.996">
<properties></properties><testcase classname="test.files.run2" name="constant-optimization.scala" time="2.888">
<system-out>
</system-out>
<system-err>
</system-err>
</testcase><testcase classname="test.files.run2" name="groupby.scala" time="2.996">
<system-out>
</system-out>
<system-err>
</system-err>
</testcase>
</testsuite>
EOFThe test report page http://localhost:8080/job/junit-reporter-bug/3/testReport/test.files/
The "run" link has leads to "http://localhost:8080/job/junit-reporter-bug/3/testReport/test.files/run/" but this displays "Build #3 / No Changes / Started By User etc".
The "run2" link works as expected.
In my broader data set, I only noticed this for the name "run". Perhaps the problem is the UI toolkit rather than pages generated by the junit-plugin, I can't spot a difference between the working and broken links when inspecting the HTML
environment
```
Jenkins ver. 2.105
Version 64.0.3282.186 (Official Build) (64-bit)
Mac OS 10.13.3
```
1 attachment
- [junit-run.png](https://issues.jenkins.io/secure/attachment/41711/junit-run.png)
> 
Contributor guide
Research direction
No source file or test is named. Reproduce the issue in the junit-plugin with the two supplied JUnit XML reports, then inspect how the test-report links are generated for the groups named "run" and "run2". Done means the "run" link opens its test-group report rather than build information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100