java Jmeter 从视图结果树侦听器将请求详细信息写入 CSV/XML
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27501806/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Jmeter writing the request details to CSV/XML from view result tree listener
提问by JaiK
When we write data of view result tree listener to CSV/XML , it does not write all data like parameters used in request to CSV.
当我们将视图结果树侦听器的数据写入 CSV/XML 时,它不会将请求中使用的参数等所有数据写入 CSV。
All the details are related to the response.How to get the the request details in the csv so that we can have one to one mapping of request and response and find out which request has failed.
所有的细节都与响应有关。如何在csv中获取请求的详细信息,以便我们可以进行请求和响应的一对一映射,并找出哪个请求失败了。
回答by Dmitri T
You can set the following properties to true
so your results file will look like what you used to see in View Results TreeListener
您可以设置以下属性,true
以便您的结果文件看起来像您在查看结果树侦听器中看到的一样
jmeter.save.saveservice.output_format=xml
jmeter.save.saveservice.response_data=true
jmeter.save.saveservice.samplerData=true
jmeter.save.saveservice.requestHeaders=true
jmeter.save.saveservice.url=true
jmeter.save.saveservice.responseHeaders=true
Above properties can be either set in jmeter.propertiesfile or in user.propertiesfile (both live under /bin folder of your JMeter installation) or passed as a command-line arguments if you run Jmeter in non-GUI mode as
以上属性可以在jmeter.properties文件或user.properties文件(都位于 JMeter 安装的 /bin 文件夹下)中设置,或者如果您在非 GUI 模式下运行 Jmeter 作为命令行参数传递
jmeter -Jjmeter.save.saveservice.output_format=xml -Jjmeter.save.saveservice.response_data=true -Jjmeter.save.saveservice.samplerData=true -Jjmeter.save.saveservice.requestHeaders=true -Jjmeter.save.saveservice.url=true -Jjmeter.save.saveservice.responseHeaders=true -n -t example.jmx -l example.jtl
Look for properties, containing "saveservice" in jmeter.properties file to see what else can be configured and into Apache JMeter Properties Customization Guidefor ways of proper setting/overriding various JMeter Properties.
在 jmeter.properties 文件中查找包含“saveservice”的属性,以查看还可以配置哪些内容,并在Apache JMeter 属性自定义指南中查找正确设置/覆盖各种 JMeter 属性的方法。
回答by Korashen
If you press on the "Configure" Button on the upper right side, you can specifiy, which data should be logged and which not. Did you configured the Result Tree Listener to store those information?
如果您按下右上角的“配置”按钮,您可以指定哪些数据应该被记录,哪些数据不应该被记录。您是否配置了结果树侦听器来存储这些信息?