JMETER_HOME环境变量未正确定义,但是构建成功并且脚本在Jmeter GUI和cmd提示符下工作正常

问题描述 投票:0回答:2

我已经创建了一个jmeter jmx脚本,并且可以在GUI和非GUI模式下完美执行。我已经在Jenkins中配置了相同的配置,但是由于错误消息“ JMETER_HOME环境变量未正确定义”,我获得了构建成功运行此程序需要此环境变量“

[我也曾尝试在用户变量中将JMETER_HOME设置为E:\ apache-jmeter-4.0,在系统变量中将Path设置为E:\ apache-jmeter-4.0 \ bin,但它不起作用。

我尝试了以下问题,但没有运气。

'jmeter' is not recognized as an internal or external command, operable program or batch file

JMETER_HOME environment variable is not defined

这是我的詹金斯的命令和错误

E:\ apache-jmeter-4.0 \ bin \ jmeter -jjmeter.save.saveservice.output_format = xml -n -t E:\ JMeter教程\ JenkinsIntegration.jmx -l E:\ JMeter教程\ JenkinsIntegrationResult.jtl

enter image description hereenter image description here

performance jenkins jmeter environment-variables load-testing
2个回答
0
投票
enter image description here

更好的方法是使用Environment Injector插件

最后但并非最不重要的一点是,您收到此消息是因为您坐在过时的JMeter 4.0中,如果升级到JMeter 5.2.1,则不会看到此警告,此外,根据9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure文章,应该始终使用最新版本的JMeter,因此无论如何升级确实有意义,请查看latest stable JMeter是什么版本并切换到该版本


0
投票
enter image description here

含5.3enter image description here

带4.0enter image description here

据我所知,我只是删除了空格,并在下面的命令中从文件夹名称JMeter Tutorial到Jmeter_Tutorial添加了下划线

E:\ apache-jmeter-4.0 \ bin> E:\ apache-jmeter-4.0 \ bin \ jmeter.bat -Jjmeter.save.saveservice.output_format = xml -n -t E:\ JMeter_Tutorial \ JenkinsIntegration.jmx- l E:\ JMeter_Tutorial \ JenkinsIntegrationResult.csv

© www.soinside.com 2019 - 2024. All rights reserved.