JMeter - 将结果保存到 CSV 和 XML [英] JMeter - saving results to both CSV and XML

查看:37
本文介绍了JMeter - 将结果保存到 CSV 和 XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图实现的是为相同的测试执行以 2 种格式获得 JMeter 结果.CSV 是我最感兴趣的,除非出现故障 - 那么我可能需要使用只能保存到 XML 的数据.由于其他原因,我无法在大多数情况下使用 XML.

我正在查看 jmeter.save.saveservice.output_format cfg 条目,它似乎不接受两者作为有效条目.我也在查看 JMeter 代码本身,它也清楚地将两个选项分开.

有没有人发明了一种同时获取两个 JMeter 输出的方法?

欢迎使用独立 JMeter 和 jmeter-maven-plugin 的解决方案.

解决方案

如果你使用 JMeter Maven 插件,按照

What I try to achieve is to get JMeter results in 2 formats, for the same test execution. CSV is the one I'm mostly interested in, unless there are failures - then I may need to use data which can be saved only to XML. I can't use XML for most occasions, due to misc reasons.

I was looking at jmeter.save.saveservice.output_format cfg entry, it doesn't seem to accept both as valid entry. I was also looking at JMeter code itself, it also clearly separates both options.

Did anyone invent a hack to get both JMeter outputs at the same time?

Solution for both standalone JMeter and jmeter-maven-plugin is welcome.

解决方案

If you use JMeter Maven plugin, as per Five Ways To Launch a JMeter Test without Using the JMeter GUI guide the default output has to be XML.

If you need CSV output as well - just add Simple Data Writer listener. If you looking for CSV data to be in line with JMeter default CSV values configure it as follows:

这篇关于JMeter - 将结果保存到 CSV 和 XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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