简体   繁体   English

从Jenkins的execute shell运行Jmeter

[英]Running Jmeter from execute shell on Jenkins

After building the maven projects I'd like to run the jmeter tests independently. 构建了maven项目之后,我想独立运行jmeter测试。 I go to the jmeter bin folder and execute: 我转到jmeter bin文件夹并执行:

jmeter -n -t $jmxFile -l $jtlFile

but I get the error: 但是我得到了错误:

/tmp/hudson2322728548480325736.sh: line 7: jmeter: command not found
Build step 'Execute shell' marked build as failure

What commands can I use? 我可以使用哪些命令?

Say I have the jmx files under one particular folder. 说我的jmx文件在一个特定的文件夹下。 If there is another way to run these tests, please let me know. 如果还有其他方法可以运行这些测试,请告诉我。

Thanks in advance. 提前致谢。

Ensure jmeter is on user running jenkins path. 确保jmeter在运行jenkins路径的用户上。 Another option is to put the full path to jmeter. 另一种选择是将完整路径放入jmeter。 A third one to use maven plugins, see: 使用maven插件的第三个,请参阅:

you can also checkout how we added JMeter tests to Jenkins: 您还可以查看我们如何将JMeter测试添加到Jenkins:

http://ibalosh.tumblr.com/post/35475979058/running-jmeter-tests-with-jenkins http://ibalosh.tumblr.com/post/35475979058/running-jmeter-tests-with-jenkins

might help Igor 可能会帮助伊戈尔

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM