[英]Cannot run my JMeter webdriver sampler script via command prompt
When I try to run my JMeter WebDriver sampler script via command prompt, the error below shows up. 当我尝试通过命令提示符运行我的JMeter WebDriver采样器脚本时,出现以下错误。 Is there any solution for this? 有什么解决办法吗?
F:\apache-jmeter-3.2\bin\TestScriptRecorder.jmx is not a valid Win32 application.
It seems you are trying to execute .jmx file directly, it won't work this way, you need to launch jmeter.bat
file and pass the .jmx file via -t
command-line argument like: 似乎您正在尝试直接执行.jmx文件,这种方式无法正常工作,您需要启动jmeter.bat
文件并通过-t
命令行参数传递.jmx文件,例如:
F:\apache-jmeter-3.2\bin\jmeter.bat -n -t F:\apache-jmeter-3.2\bin\TestScriptRecorder.jmx -l result.jtl
or 要么
java -jar F:\apache-jmeter-3.2\bin\ApacheJMeter.jar -n -t F:\apache-jmeter-3.2\bin\ -l result.jtl
References: 参考文献:
If you want run your Jmx through command line follow the below steps. 如果要通过命令行运行Jmx,请执行以下步骤。
For Windows: jmeter -n -t C:\\your_testScript_path\\yourscript.jmx
对于Windows: jmeter -n -t C:\\your_testScript_path\\yourscript.jmx
For ubuntu/linux: ./jmeter.sh -n -t C:\\your_testScript_path\\yourscript.jmx
对于ubuntu / linux: ./jmeter.sh -n -t C:\\your_testScript_path\\yourscript.jmx
you can aslo pass any values to the jmx files using command line using command line paremeters like -JUsers=10
where in it should be defined in jmx like ${__P(Users,1)}
您可以使用-JUsers=10
类的命令行参数通过命令行使用-JUsers=10
将任何值传递给jmx文件,其中应在${__P(Users,1)}
jmx中定义它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.