-
Bug
-
Resolution: Fixed
-
Blocker
-
Jenkins ver. 2.19.1
I have applied the HPI plugin from https://jenkins.ci.cloudbees.com/job/plugins/job/performance-plugin/ws/target/ since I was experiencing the issue https://issues.jenkins-ci.org/browse/JENKINS-43503 and tried generating the performance report as below in pipeline script and am using apache-jmeter-2.11_KL1
I tried with relative path
def jmeterTestFile = 'jmeter_test'
performanceReport parsers: [[$class: 'JMeterParser', glob: "jmeter_scripts
${jmeterTestFile}_results.jtl"]], relativeFailedThresholdNegative: 1.2, relativeFailedThresholdPositive: 1.89, relativeUnstableThresholdNegative: 1.8, relativeUnstableThresholdPositive: 1.5
perfReport "jmeter_scripts${jmeterTestFile}_results.jtl"
And I was getting below exception
java.lang.IllegalArgumentException: Can not detect file type: C:\tools\Jenkins\jobs\PerformanceTesting\builds\20\temp\jmeter_test_results.jtl
at hudson.plugins.performance.parsers.ParserDetector.detect(ParserDetector.java:38)
at hudson.plugins.performance.parsers.ParserFactory.getParser(ParserFactory.java:43)
at hudson.plugins.performance.PerformancePublisher.getParsers(PerformancePublisher.java:439)
at hudson.plugins.performance.PerformancePublisher.perform(PerformancePublisher.java:487)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
at hudson.security.ACL.impersonate(ACL.java:221)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
And I tried with '*/.jtl' as below
performanceReport parsers: [[$class: 'JMeterParser', glob: "**/*.jtl"]], relativeFailedThresholdNegative: 1.2, relativeFailedThresholdPositive: 1.89, relativeUnstableThresholdNegative: 1.8, relativeUnstableThresholdPositive: 1.5
perfReport "*/.jtl"
And I was getting below exception
Performance: Recording JMeter reports '*/.jtl'
Performance: Parsing JMeter report file 'C:\tools\Jenkins\jobs\PerformanceTesting\builds\21\performance-reports\JMeter\jmeter_test_results.jtl'.
Performance: Failed to parse file 'C:\tools\Jenkins\jobs\PerformanceTesting\builds\21\performance-reports\JMeter\jmeter_test_results.jtl': Missing required column
java.lang.Exception: Missing required column
at hudson.plugins.performance.parsers.JMeterCsvParser.readCSVHeader(JMeterCsvParser.java:106)
at hudson.plugins.performance.parsers.JMeterCsvParser.parse(JMeterCsvParser.java:61)
at hudson.plugins.performance.parsers.JMeterParser.parseCsv(JMeterParser.java:191)
at hudson.plugins.performance.parsers.JMeterParser.parse(JMeterParser.java:51)
at hudson.plugins.performance.parsers.AbstractParser.parse(AbstractParser.java:67)
at hudson.plugins.performance.PerformancePublisher.perform(PerformancePublisher.java:520)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
at hudson.security.ACL.impersonate(ACL.java:221)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
In both cases I noticed plugin trying to look the jtl file in wrong location 'C:\tools\Jenkins\jobs\PerformanceTesting\builds\21\performance-reports\JMeter\jmeter_test_results.jtl' which doesnt exist on file system, jtl file exists in `C:\tools\jenkins\workspace\PerformanceTesting\jmeter_scripts\jmeter_test_results.jtl` location