0
votes

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?

[enter image description here][build results]

[enter image description here][build.xml from ant\bin location]

[enter image description here][location of test.jtl results file]

[enter image description here][results are empty]

1

1 Answers

0
votes

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