2
votes

I am trying to run jmeter(.jmx) file using Jenkins by passing Number of Threads as a Parameter. Build getting success but .jmx file is not running. And also not showing any error in console.Following are my setup

  1. In Jmeter Thread properties --Number of thread (Users)- ${__P(USERS,1)
  2. In Jenkins job Created build string parameter -- USER_COUNT
  3. Build using Execute shell and following is my command
    cd /apache-jmeter-2.13/bin ./jmeter.sh -n -t /jmxFiles/Jbpm6Rest3Jenkins1.jmx -l /jmxFiles/SIP.jtl -JUSERS=%USER_COUNT%
  4. While starting build passing USER_COUNT value from Jenkins

    Following is the Jenkins console output

Jenkins Console Output

Not sure where i am doing wrong.

Note: Not using Ant/Maven to run jmx file.

2

2 Answers

1
votes

From the output, seems you are running a shell build step ($ /bin/sh -xe ....), which means your Jenkins runs on Linux (?). Also the paths use forward slash (/)....

You should put the string ${USER_COUNT} as part of your command (%USER_COUNT% is windows style).

I hope this helps.

2
votes

As the other answer mentioned, change the %_USER_COUNT% to ${USER_COUNT}.

But is there any specific reason you are not using Ant/Maven?

Eventhough you should be able to run your jmeter test using a simple shell script, using Ant/Maven might make your life easier while generating report, charts etc.

I would advise you check the below links.

http://www.testautomationguru.com/jmeter-continuous-performance-testing-part1/ http://www.testautomationguru.com/jmeter-continuous-performance-testing-part2/