I wrote a script in Jmeter that is fine being executed from GUI mode but will fail when being executed from CLI mode (non-GUI)
This is the result from CLI mode:
D:\apache-jmeter-5.4.3\apache-jmeter-5.4.3\bin>jmeter -n -t D:\apache-jmeter-5.4.3\apache-jmeter-5.4.3\bin\homepage.jmx
Created the tree successfully using D:\apache-jmeter-5.4.3\apache-jmeter-5.4.3\bin\homepage.jmx
Starting standalone test @ Fri Mar 18 09:41:02 EET 2022 (1647589262323)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
summary + 1 in 00:00:00 = 25.0/s Avg: 0 Min: 0 Max: 0 Err: 1 (100.00%) Active: 1 Started: 1 Finished: 0
summary + 19 in 00:00:05 = 4.0/s Avg: 0 Min: 0 Max: 0 Err: 19 (100.00%) Active: 0 Started: 20 Finished: 20
summary = 20 in 00:00:05 = 4.2/s Avg: 0 Min: 0 Max: 0 Err: 20 (100.00%)
Tidying up … @ Fri Mar 18 09:41:07 EET 2022 (1647589267321)
… end of run
Why is this happening and how can i fix it ?
You’re just running your test without storing the results and from the output it seems that all your 20 requests have failed.
jmeter -n -t D:\apache-jmeter-5.4.3\apache-jmeter-5.4.3\bin\homepage.jmx -l result.jtl
and then inspect the
result.jtl file using Excel or equivalent or generate HTML Reporting Dashboard out of it, you will see at least response code and message.
Answered By – Dmitri T
Answer Checked By – Robin (BugsFixing Admin)