I am having a linux machine (say m1) [an openStack machine] to run my jmeter test. My typical process was to put latest jmx file on this machine and trigger below command: nohup /path/to/jmeter/bin/jmeter -n -t /path/to/script/test.jmx -l /path/to/resultsFolder/results.jtl
Now, I want to trigger same test via jenkins job which should actually do the same activity as above.
I perform two activities (one is to manually trigger jmeter-server on m1 and other to run jenkins job to run test via m1)
To start jmeter server Ran following command manually on m1 ( SERVER_PORT=1099 nohup /path/to/jmeter/bin/jmeter-server)
Jenkins Job
I have created a jenkins pipeline job:
Stage1: checks out jmeter in jenkins master
stage2: checks out latest script in jenkins master
stage3: Runs jmeter remote test -
command used :
sh '''
chmod u+x jmeter/bin/jmeter.sh
jmeter/bin/jmeter.sh -n -t path/where/jenkins/checked/latest/test/test.jmx -R 10.X.X.X -l results.jtl'''
Stage1 and stage2 runs perfectly.
Stage3: console output shows as below
- jmeter/bin/jmeter.sh -n -t jmeter/bin/jmeter.sh -n -t path/where/jenkins/checked/latest/test/test.jmx -R 10.X.X.X -l results.jtl
- Creating summariser
- Created the tree successfully using path/where/jenkins/checked/latest/test/test.jmx
- Configuring remote engine: 10.X.X.X
- Starting remote engines
- Starting the test @ Tue Aug 14 10:41:46 CEST 2018 (1534236106818)
- Remote engines have been started
- Waiting for possible shutdown message on port 4445
And it keep showing processing ......... unless I trigger manual shutdown.
So, I'm looking for two things
- a mechanism to start jmeter-server on slave nodes via jenkins job itself
- Running test via remote machines (which can go locations within load machine and trigger test from there itslef)
. Any ideas appreciated. Thank you in advance!