0

How to run the Jmeter tests from bamboo? I tried in Jenkins which has the 'Execute windows batch command' option and I just pasted these lines and worked fine

jmeter -n -t C:\apache-jmeter-2.13\apache-jmeter-2.13\bin\test.jmx 

I need to work the same with bamboo as well. So I tried with the script task, selected Inline and in the script body I pasted the above lines It failed with this error

/opt/bamboo/current/temp/TEST-NEW-NEW-33-ScriptBuildTask-6294682377804302931.sh: line 2: C:Jmeterapache-jmeter-2.13bin: command not found

/opt/bamboo/current/temp/TEST-NEW-NEW-33-ScriptBuildTask-6294682377804302931.sh: line 3: jmeter: command not found

I tried with the Command task also in bamboo but no luck.

I'm struggling how to run Jmeter tests from bamboo? Anyone please advise. I see that we can do it with maven I believe, but I don't know much about it, but if anyone has step by step instructions that I can follow that helps as well.

Thanks in advance

Nachiket Kate
  • 8,473
  • 2
  • 27
  • 45
user3381098
  • 93
  • 1
  • 5
  • 13

3 Answers3

0

Define the jmeter executable as a remote capabiliety.

Then add a new command to your task and select jmeter as executable. Add your arguments and you are done.

user3415653
  • 325
  • 3
  • 14
  • Mine is local agent and not remote agent which is showing as default agent and I'm totally new to this bamboo and am learning as I go. How does this work with local agent? Please elaborate. Thanks for the help. – user3381098 Jun 17 '15 at 15:11
  • `/opt/bamboo/current/` looks pretty much like Linux path so consider other Bamboo step. – Dmitri T Jun 17 '15 at 20:03
0

It looks like that you need to either need to escape backslashes like:

C:\\apache-jmeter-2.13\\apache-jmeter-2.13\\bin\\test.jmx

or change them to forward slashes as:

C:/apache-jmeter-2.13/apache-jmeter-2.13/bin/test.jmx

Other options on how to kick off a JMeter test from Bamboo build step are:

See 5 Ways To Launch a JMeter Test without Using the JMeter GUI guide for detailed information on aforementioned options.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
0

I assume your Bamboo is in a linux environment.

From Bamboo on Linux, create a new task and select script:

cd /<your path>/apache-jmeter-2.13/bin
./jmeter -n -t <your path>/test.jmx 

If Windows, set environment variable JMETER_HOME to C:\apache-jmeter-2.13\apache-jmeter-2.13\ and then on Bamboo's command line:

cd C:\apache-jmeter-2.13\apache-jmeter-2.13\bin\ 
jmeter -n -t test.jmx
George
  • 6,006
  • 6
  • 48
  • 68