jmx loc = "E:\Abhishek\Performance testing result\abc.jmx"
jtl loc = "E:\Abhishek\Performance testing result\def.jtl"
Jmeter loc = "E:\Abhishek\Performance testing tools\apache-jmeter-3.3\apache-jmeter-3.3\bin"

in cmd i moved to bin loc

1) jmeter -n -t \Abhishek\Performance testing result\abc.jmx  -l \Abhishek\Performance testing result\def.jtl

2) jmeter -n -t abc.jmx -l def.jtl

am getting an error
An error occurred: Unknown arg: testing
Press any key to continue . . .

how to resolve this ??

Read more: https://softwaretestingboard.com/qna/2725/

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

2 Answers

by (748 points)
+1 vote

first, maintain test result file in bin folder after that run this command and if you want to log then run this command:
jmeter -n -t YourJmeterTestPlan.jmx -l TestResultFile.jtl  -j LogFile.log

by (1.1k points)
i have one doubt all the files shoud be in bin folder ah ?
(i,e) .jmx, .jtl, .log .
then only this cmd will run
only .jtl file shoud be in bin folder ?

Copied from Abhishek's comment.
by (748 points)
First it make jmx file to save all records and if someone want run script in non gui mode for more than 10 users then run {jmeter -n -t YourJmeterTestPlan.jmx}  in cmd .After that TestResultFile maintain in bin folder in apache jmeter directory {-l TestResultFile.jtl} and if you want log then { -j LogFile.log }

>jmeter -n -t YourJmeterTestPlan.jmx -l TestResultFile.jtl  -j LogFile.log    //overall run in cmd
Helpful notes:
-n – Non-GUI mode – This specifies JMeter is to run in non-gui mode
-t – Name of JMX file that contains Test Plan
-l – Name of JTL file (JMeter text logs) to capture log results        
-j – Name of Log file to capture execution logs
by (190 points)
Thank You @Bharat, I will Try it .
by (190 points)
edited by

My Test plan Save location = "E:\Abhishek\Performance testing tools\apache-jmeter-3.3\apache-jmeter-3.3\bin\examples"
In this loc am having my .jmx and .jtl file

i moved to bin folder
i run the cmd
jmeter -n -t login.jmx -l sample.jtl

This time am getting
Could not open login.jmx

if i give like this

jmeter -n -t E:\Abhishek\Performance testing tools\apache-jmeter-3.3\apache-jmeter-3.3\bin\examples\login.jmx -l E:\Abhishek\Performance testing tools\apache-jmeter-3.3\apache-jmeter-3.3\bin\examples\sample.jtl

An error occurred: Unknown arg: testing
by (748 points)
If it possible to share jmx file wtih hide your aplication url .So, i can check in my end
0 votes

You must keep your .jmx file in jmeter bin folder and you can change your log file location anywhere you wish.

Just run this after placing the .jmx file in your jmeter bin folder ,

jmeter -n -t abc.jmx -l def.jtl

jmeter -n -t abc.jmx -l C:\users\desktop\def.jtl

jmeter -n -t abc.jmx -l C:\users\desktop\def.Csv

jmeter -n -t abc.jmx -l C:\users\desktop\def.Txt

jmeter -n -t abc.jmx -l C:\users\desktop\def.Xls

If the log file is not there in the location, it will create a new file while running the test.