Home > Blockchain >  Unable to successfully build a Jmeter test on Jenkins
Unable to successfully build a Jmeter test on Jenkins

Time:11-08

I am attempting to run a Jmeter test on jenkins with the following script under windows batch command:

C:\Users\udeme.bassey\Downloads\apache-jmeter-5.4.1\apache-jmeter-5.4.1\bin>jmeter -jjmeter.save.saveservice.output_format=csv -n -t "C:\Users\udeme.bassey\Downloads\apache-jmeter-5.4.1\apache-jmeter-5.4.1\bin\VibraniumValley.jmx" -l "C:\Users\udeme.bassey\Downloads\apache-jmeter-5.4.1\apache-jmeter-5.4.1\bin\Reports\VVjenkinsreport.csv"

Jenkin's console output returns the following: Running as SYSTEM Building in workspace C:\Program Files (x86)\Jenkins\workspace\JmeterJenkinsJob [JmeterJenkinsJob] $ cmd /c call C:\WINDOWS\TEMP\jenkins930034514613825368.bat

C:\Program Files (x86)\Jenkins\workspace\JmeterJenkinsJob>C:\Users\udeme.bassey\Downloads\apache-jmeter-5.4.1\apache-jmeter-5.4.1\bin -jjmeter.save.saveservice.output_format=csv -n -t "C:\Users\udeme.bassey\Downloads\apache-jmeter-5.4.1\apache-jmeter-5.4.1\bin\VibraniumValley.jmx" -l "C:\Users\udeme.bassey\Downloads\apache-jmeter-5.4.1\apache-jmeter-5.4.1\bin\Reports\VVjenkinsreport.csv" 1>jmeter 'C:\Users\udeme.bassey\Downloads\apache-jmeter-5.4.1\apache-jmeter-5.4.1\bin' is not recognized as an internal or external command, operable program or batch file.

C:\Program Files (x86)\Jenkins\workspace\JmeterJenkinsJob>exit 9009 Build step 'Execute Windows batch command' marked build as failure Creating parser with percentiles:'0,50,90,100,' filterRegex: Performance: Recording JMeterCsv reports 'C:\Program Files (x86)\Jenkins\jobs\JmeterJenkinsJob\builds\18\temp\VVjenkinsreport.csv' Performance: JMeterCsv copying reports to master, files '[C:\Program Files (x86)\Jenkins\jobs\JmeterJenkinsJob\builds\18\temp\VVjenkinsreport.csv]' Performance: JMeterCsv parsing local reports '[C:\Program Files (x86)\Jenkins\jobs\JmeterJenkinsJob\builds\18\performance-reports\JMeterCSV\VVjenkinsreport.csv]' Performance: Parsing report file 'C:\Program Files (x86)\Jenkins\jobs\JmeterJenkinsJob\builds\18\performance-reports\JMeterCSV\VVjenkinsreport.csv' with filterRegex ''. Performance: No threshold configured for making the test unstable Performance: No threshold configured for making the test failure Performance: File VVjenkinsreport.csv reported 25.0% of errors [SUCCESS]. Build status is: FAILURE Finished: FAILURE

CodePudding user response:

You either have a typo in your command or it's a copy-paste issue. You need to change > to \

C:\Users\udeme.bassey\Downloads\apache-jmeter-5.4.1\apache-jmeter-5.4.1\bin>jmeter 
                                                                           ^ here

Also JMeter command-line arguments are case-sensitive, if you want to pass jmeter.save.saveservice.output_format=csv parameter to override .jtl file output format property you need to use capital J like:

jmeter -Jjmeter.save.saveservice.output_format=csv

More information: Continuous Integration 101: How to Run JMeter With Jenkins

  • Related