如何在JMeter CSV输出文件中添加变量名? [英] How to add variable names to the JMeter CSV output file?

查看:600
本文介绍了如何在JMeter CSV输出文件中添加变量名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JMeter进行性能测试,并生成一个CSV文件进行数据分析.

I'm using JMeter for performance testing and generate an CSV file for data analysis.

如何将JMeter变量名称添加到CSV输出?似乎只能添加预定义的列(请参见屏幕截图).

How should I add JMeter Variable names to the CSV output? It seems that only pre-defined columns can be added (see screenshot).

这是我的日志文件:

14/03/2014,Login,OK,982
14/03/2014,Search,OK,2182
14/03/2014,Login,OK,3982

我想添加一个带有$ {username}的列,以生成如下内容:

I would like to add a column with the ${username} to generate something like:

14/03/2014,Login,OK,982,user1
14/03/2014,Search,OK,2182,user7
14/03/2014,Login,OK,3982,user9

推荐答案

尝试传递sample_variables属性,例如作为命令行参数-Jsample_variables=username,some_other_var

Try to pass sample_variables property, for example as command-line parameter -Jsample_variables=username,some_other_var

如果您需要自定义格式,还请参见FlexibleFileWriter插件 http://jmeter-plugins.org/wiki/FlexibleFileWriter/?utm_source=jmeter&utm_medium=helplink&utm_campaign=FlexibleFileWriter

Also see FlexibleFileWriter plugin if you need custom formatting http://jmeter-plugins.org/wiki/FlexibleFileWriter/?utm_source=jmeter&utm_medium=helplink&utm_campaign=FlexibleFileWriter

这篇关于如何在JMeter CSV输出文件中添加变量名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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