使用ant运行Jmeter时Jtl文件为空 [英] Jtl file is empty when running Jmeter using ant

查看:47
本文介绍了使用ant运行Jmeter时Jtl文件为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 ant 运行 Jmeter,(因为我想显示测试结果以及所有步骤).问题是,在我设法运行命令后,Jtl 文件为空,我正在尝试运行基本的 test.jmx 默认测试.我运行命令 ant -Detest=Test run构建成功,但 jtl 结果为空.而且它在一秒钟后完成,而如果我通过 UI 模式运行它应该需要更多时间.

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.

有人可以建议如何将 ant 与 Jmeter 一起使用,或者如何在 html 输出中像 csv 一样获得完整的报告?

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

[][构建结果]

[][来自 ant\bin 位置的 build.xml]

[][build.xml from ant\bin location]

[][test.jtl 结果文件的位置]

[][location of test.jtl results file]

[][结果为空]

推荐答案

很可能是您的 JMeter 测试本身出了问题,即

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

  • JMeter 无法启动(安装或配置问题)
  • 它在 线程组
  • 中有 0 个线程
  • 有一个如果控制器阻止测试执行的条件
  • 测试依赖于未安装的 JMeter 插件
  • 等.

所以我建议修改您的 build.xml 文件并通过将下一行添加到 <jmeter> 部分来启用写入 JMeter 日志文件:jmeterlogfile="${testpath}/jmeter-ant.log >

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 >

所以它看起来像

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

当您再次运行测试时,您应该会在 .jmx 文件所在的文件夹中看到 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.

更多信息:JMeter Ant 任务

这篇关于使用ant运行Jmeter时Jtl文件为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆