How to run jmeter script on linux server

WHAT IS JMETER?

Apache JMeter is a pure open source Java application designed to load test functional behavior of a system and measure its performance.

JMeter used  to measure the performance of a web application or other web services against heavy load, with multiple and concurrent user traffic.

These are the steps to run jmeter script on server:-

STEP 1.  INSTALL JMETER ON LINUX SERVER

1.  INSTALL JAVA:- 

To install JMeter on  Linux Server you must have to  install Java first.

2.  INSTALL JMETER:-

  •  Download the latest version of jmeter.
  • Connect to the server using  ssh your_username@host_ip_address       Example- ssh ubuntu@test.aurigastore.com
  • Zip the Jmeter folder and upload it on the server using scp [source file] [username]@[destination server]:[destination file]  Example- scp Jmeter\ 5.4.1.zip ubuntu@test.aurigastore.com:/home/ubuntu/jmeter
  • Extract there-> Now Jmeter  set up is on the server

 

3.  RUN JMETER

  Go to the JMeter bin directory, for example: cd /apache-jmeter-5.4.1/bin

   And run ./jmeter.sh

STEP 2. UPLOAD/RUN JMX FILE ON LINUX SERVER

1. UPLOAD .JMX FILE

Upload .jmx file on server using scp [source file] [username]@[destination server]:[destination file]

For example: scpfaceesign_SDK\Prod.jmxubuntu@test.aurigastore.com:/home/ubuntu/jmeter

2. RUN JMX FILE

Run below command on server-

./jmeter.sh -n -t /home/ubuntu/jmeter/faceesign_Prod.jmx -l /home/ubuntu/jmeter/prod_sdk-result.jtl -j /home/ubuntu/jmeter/prod-result.log -DTHREADS=1 -DRAMP_UP=1 -DLOOP_COUNT=1

-n: It specifies JMeter is to run in non-gui mode

-t: Name of JMX file that contains the Test Plan

-l: Name of JTL(JMeter text logs) file to log results

-j: Name of JMeter run log file

Run below command if script contains csv file-

./jmeter.sh -n -t /home/ubuntu/jmeter/faceesign_Prod.jmx -l /home/ubuntu/jmeter/prod_sdk-result.jtl -j /home/ubuntu/jmeter/prod-result.log -DTHREADS=1 -DRAMP_UP=1 -DLOOP_COUNT=1 -DDATACSV=/home/ubuntu/jmeter/test.csv

Comments