Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
- Ubuntu 32 bit, OpenJDK 1.6.0_22
- Jenkins 1.410 from the Jenkins debian repo
- Performance plugin 1.6 installed trough the web interface
- Standard maven project (created with archetype:quickstart) with one unit test
- For the build I've configured the performance plugin with one junit entry and set the "Report files" directory to "target/surefire-reports"- Ubuntu 32 bit, OpenJDK 1.6.0_22 - Jenkins 1.410 from the Jenkins debian repo - Performance plugin 1.6 installed trough the web interface - Standard maven project (created with archetype:quickstart) with one unit test - For the build I've configured the performance plugin with one junit entry and set the "Report files" directory to "target/surefire-reports"
Description
The performance plugin doesn't parse the JUnit reports correctly (it uses the JMeter parser for them). This can be fixed by harcoding JUnitParser instead of JMeterParser in PerformanceReportMap, so that it looks like the following (around lines 62-63):
if (files != null)
{ addAll(new JUnitParser("").parse(buildAction.getBuild(), Arrays.asList(files), listener)); }However a better fix is needed which selects the appropriate parser based on the current configuration.
Attachments
Issue Links
- is related to
-
JENKINS-5571 PLUGIN: Performance - Graphs and Statistics of TestRuns based on JUnit File Shown in Uncorrect Way
-
- Resolved
-
After more debugging it seems to me that I've found the issue: each parser should put its performance reports in its subdirectory (ie. performance-reports/JUnit, performance-reports/JMeter, etc), with the files in performance-reports directory being interpreted as JMeter (for backward compatibility). However this doesn't seem to be fully implemented in at least two ways:
I attached a patch which fixes both of these issues, and additionally it changes the subdirectory name from being based on the class name on a string, because the class name can contain special characters (like "$") which might not be well liked by some filesystems.
Please let me know if the diagnosis is correct. Also, one possible issue I see is that if two reports are present in two directories (ie a Junit report with name report.xml and a JMeter report with name report.xml), they will override each other in some data structures and the wrong data will be shown. Usually this shouldn't happen, given the naming convention of the unit test reports.