1
votes

I'm trying to run jmeter load testing scripts using CLI using the following command:

jmeter -n -t {PATH TO JMETER SCRIPT(JMX)} -l {PATH TO JTL FILE} -e -o {PATH OF FOLDER WHERE YOU WISH TO SAVE REPORT DASHBOARD}

Example:

H:\Apache Jmeter 5.0\bin>jmeter -n -t C:\stressTest\Master-Script.jmx -l C:\stressTest\Results\Result-${currentTime}.csv -e -o C:\stressTest\Html\${currentTime}

and the scripts runs and generates the csv file as expected, but while generating the html report (web reports dashboard), I get the following output:

Starting the test @ Tue Mar 03 13:01:30 EST 2020 (1583258490364)
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
summary =      0 in 00:00:00 = ******/s Avg:     0 Min: 9223372036854775807 Max: -9223372036854775808 Err:     0 (0.00%)
Tidying up ...    @ Tue Mar 03 13:01:36 EST 2020 (1583258496832)
Error generating the report: org.apache.jmeter.report.core.SampleException: Could not locate input sample files !
... end of run 

I'm fairly new and I might be missing something here. Any help is appreciated.

Thanks in advance.

1

1 Answers

0
votes

Neither cmd.exe is not able resolve your ${currentTime} expression, if you want to generate a .jtl result file with the timestamp you need to use date command like:

H:\Apache Jmeter 5.0\bin>jmeter -n -t C:\stressTest\Master-Script.jmx -l C:\stressTest\Results\Result-%date:~10,4%_%date:~4,2%_%date:~7,2%.csv -e -o C:\stressTest\Html\%date:~10,4%_%date:~4,2%_%date:~7,2%

enter image description here

More information: How Do I Run JMeter in Non-GUI Mode?