0

I am trying to run a JMeter test script and generate a dashboard to analyze the test results(in HTML).

As per the user manual , it suggests to run the following command.

jmeter -g <log file> -o <Path to output folder>

But when I am running the command, it says unknown option -g. I tried with jmeter --help in the list of parameters -g is not found. Can someone help me to debug this issue?

Aksen P
  • 4,564
  • 3
  • 14
  • 27
anushiya-thevapalan
  • 561
  • 3
  • 5
  • 16

2 Answers2

1

As per the documentation, following is the description:

To generate a Report from existing CSV file: Open a command prompt (or Unix shell) and type:

jmeter.bat(Windows)/jmeter.sh(Linux) -g [csv results file] -o [path to output folder (empty or not existing)]

Following might be the issue:

  • [-g] option requires the csv result file. Make sure you have that result csv
  • Normally -g option should be working in normal JMeter build. Try downloading the latest build from JMeter portal and check.
SAIR
  • 479
  • 3
  • 9
  • I have a CSV file and I executed the following command as per your suggestion ```jmeter.sh -g [csv results file] -o [path to output folder]``` it says ```jmeter.sh: command not found``` I have installed the latest verion of jmeter (5.1.1). I also downloaded it again to check, but no difference in the error – anushiya-thevapalan Aug 09 '19 at 06:25
  • Are you running on Windows or Unix? Command file changes depending on which environment you are running. jmeter.bat for windows and jmeter.sh is for unix. If on Windows check whether your Environment variable is set properly. Ideally if your path and environment variable are properly set, this kind of error will not come. https://stackoverflow.com/questions/48882280/jmeter-home-environment-variable-is-not-defined – SAIR Aug 09 '19 at 06:35
  • I am using Unix. I have the environmental variable set correctly – anushiya-thevapalan Aug 09 '19 at 06:40
  • Looking from this error : jmeter.sh: command not found. Try running jmeter from outside of jmeter installation and see what is gives. Also check permission related to files and folders where you are writing the report. Run only jmeter -g <.csv> -o Sample/ – SAIR Aug 09 '19 at 06:44
  • When running the ```jmeter.sh``` outside the jmeter installation, it again says ```command not found```. But ```jmeter``` command works. i ran ```jmeter -g results.csv -o jmeter-results```. But again I am getting an error, ```unknown option -g``` – anushiya-thevapalan Aug 09 '19 at 06:54
0

Finally I found a solution that works for me.

./jmeter -g results.csv -o jmeter-results

Format:

./jmeter -g [path to test results file (can be csv or jtl)] -o [path to output folder]

anushiya-thevapalan
  • 561
  • 3
  • 5
  • 16