1

https://github.com/oliverlloyd/jmeter-ec2

script: https://github.com/oliverlloyd/jmeter-ec2/blob/master/jmeter-ec2.sh

I try to get this script running from Jenkins, if i execute it with my Mac bash version 3.2. its runs perfect but in jenkins it's tell me the script has errors.

Jenkins Bash version: 4.3-14 Ubuntu

Complete Shell output:

[Loadtest API - EC2] $ /bin/sh -xe /tmp/hudson8877679109648570428.sh
+ count=1 sudo ./jenkins-ec2.sh api/cam_api_test2.jmx api_host=api.dir.sf-test1.com,users=2000,steps=100,load=240,steps_rate=10,ramp=5
Cloning into 'jmeter-ec2'...
Writing jmeter-ec2 properties
Writing SSH Config
Adding Custom Properties
../jmeter-ec2/jmeter-ec2.sh: line 57: /var/lib/jenkins/workspace/Loadtest: No such file or directory
basename: extra operand ‘-’
Try 'basename --help' for more information.
../jmeter-ec2/jmeter-ec2.sh: line 87: [: too many arguments
WARN: Did not see a custom jmeter.properties file. Please ensure the remote hosts have the required settings 'jmeter.save.saveservice.output_format=csv' and 'jmeter.save.saveservice.thread_counts=true'
ERROR: Could not find test plan at the following location: /var/lib/jenkins/workspace/Loadtest API - EC2/test_project/jmx/.jmx
Finished: SUCCESS
  1. Error

    ../jmeter-ec2/jmeter-ec2.sh: line 57: /var/lib/jenkins/workspace/Loadtest: No such file or directory basename: extra operand ‘-’ Try 'basename --help' for more information.

Script line

LOCAL_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#Output LOCAL_HOME "/var/lib/jenkins/workspace/Loadtest API - EC2"

# Execute the jmeter-ec2.properties file, establishing these constants.
. $LOCAL_HOME/jmeter-ec2.properties
  1. Error

    ../jmeter-ec2/jmeter-ec2.sh: line 87: [: too many arguments

Script line

    if [ -r $LOCAL_HOME/jmeter.properties ] ; then

Thx for the help.

Stefan_K
  • 11
  • 2

0 Answers0