Jtl file is empty when running Jmeter using ant

假如想象 提交于 2019-12-13 03:56:59

问题


I am trying to run Jmeter with ant, (since I want to display the results of test, with all the steps). The issue is that after I managed to run the command the Jtl file is empty, I am trying to run the basic test.jmx default test. I run the command ant -Detest=Test run the build is successful but the jtl results are empty. moreover it is finished after one second, while if I run via UI mode it should take more time.

Can someone please advise how to use ant with Jmeter, or how to get fully reports like in csv in html out put?

[

][build results]

[

][build.xml from ant\bin location]

[

][location of test.jtl results file]

[

][results are empty]

回答1:


Most probably something is wrong with your JMeter test itself, i.e.

  • JMeter failed to start (installation or configuration issues)
  • it has 0 threads in Thread Group
  • there is an If Controller condition which prevent test execution
  • the test relies on a JMeter Plugin which is not installed
  • etc.

So I would recommend amending your build.xml file and enable writing JMeter log file by adding the next line to <jmeter> section: jmeterlogfile="${testpath}/jmeter-ant.log >

So it would look like

<jmeter
    jmeterhome="${jmeter.home}"
    testplan ="${testpath}/${test}.jmx"
    resultlog="${testpath}/${test}.jtl"
    jmeterlogfile="${testpath}/jmeter-ant.log>

When you run your test one more time you should see jmeter-ant.log file in the folder where your .jmx file lives.

More information: JMeter Ant Task



来源:https://stackoverflow.com/questions/50549948/jtl-file-is-empty-when-running-jmeter-using-ant

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!