Reputation: 1237
I am facing an issue for a long time. I want to create html with full Jmeter reports. the only solution is using ant, to run jmeter according some sites.
-Djmeter.home=
.. - C:\Jmeter_4.0\apache-jmeter-4.0<property name="jmeter.home" value=
"C:\Jmeter_4.0\apache-jmeter-4.0/.."/>I got error build failed C:\ant\ant\bin.xml:89:jmeter jar file not found or not a vaild file c:\jmeter_4.0\bin\ApachJmeter.jar
I know this is a long question but I am facing it for a long time. hopefully jmeter or someone will make plugin or something to do it easier, just to see all the results in html in one place.
can someone advise what I am missing?
** I noticed that Jmeter.jar exists in the error location, so I do not understand what more need to add.
[][copy form jmeter extras]
[][copied to ant bin folder]
[][create Test.jtl file in ant/bin]
[][Modified build.xml in ant bin]
[][Run command and get errors]
[][Jmeter jar exists]
Upvotes: 0
Views: 726
Reputation: 168072
You should be running your test as:
ant -Djmeter.home=c:\Jmeter_4.0\apache-jmeter-4.0
or alternatively you can hard-code path to your JMeter installation into your build.xml file like:
<property name="jmeter.home" value="C:/Jmeter_4.0/apache-jmeter-4.0"/>
When you override property value using -D
command-line argument there Ant doesn't the properties defined in the build.xml file into consideration, it will use what you pass in the command line. See Properties and PropertyHelpers Ant User Manual chapter for more details.
Going forward I would recommend you adding jmeterlogfile
parameter to jmeter
task like:
<jmeter
jmeterhome="${jmeter.home}"
testplan="${testpath}/${test}.jmx"
resultlog="${testpath}/${test}.jtl"
jmeterlogfile="/path/to/jmeter.log">
This way you will be able to get jmeter.log file generated at the defined location, in the majority of cases it will help to troubleshoot the issue. More information: How to Configure JMeter Logging
Upvotes: 0