当前位置:网站首页>Jmeter性能测试之使用存储响应内容到文件监听器
Jmeter性能测试之使用存储响应内容到文件监听器
2022-07-26 07:31:00 【慕城南风】
Jmeter使用存储响应内容到文件监听器
1.概述
在使用Jmeter做性能测试时,有些时候需要将接口返回信息存储到文件中。最开始实现的方式是写一个beanShell脚本实现。现在Jmeter提供了将响应内容保存到文件的监听器不再需要手写脚本,使用非常简单方便。这篇文章介绍这个监听组件使用方法。
2.响应内容保存到文件监听器使用场景
使用接口返回的数据造测试数据,例如批量创建商品订单号。
2.1.添加保存响应内容到文件监听器组件
在请求右键添加添加Listener——>SaveResponses to a file

2.2.SaveResponses to a file 组件配置

设置文件保存路径及名称前缀说明
- 设置响应内容保存到文件的路径,需要注意这个路径的文件夹需要提前已创建好,且设置路径文件夹后面需要有个路径符号,例如 D:\liveFile\ 在最后有个斜杠符号,如果没有这个符号他会将liveFile当做文件名称的前缀,将文件保存在D盘下。
2.3.测试响应内容保存到文件
启动Jmeter脚本,当脚本停止后打开设置文件保存的文件夹,查看响应内容已经保存到文件中。

边栏推荐
- Configure flask
- Machine learning related competition website
- Modulenotfounderror: no module named 'pip' solution
- JWT quick start
- Taishan Office Technology Lecture: how to calculate page blank (margin)
- Model pruning 3: learning structured sparsity in deep neural networks
- NLP natural language processing - Introduction to machine learning and natural language processing (3)
- DADNN: Multi-Scene CTR Prediction via Domain-Aware Deep Neural Network
- VScode无法启动问题解决思路
- 数据库基础
猜你喜欢

【uniapp】多种支付方式封装

4. Data integrity

Program environment and pretreatment

Wrong Addition

Kdd2022 | uncover the mystery of Kwai short video recommendation re ranking, and recommend the new SOTA

PXE高效批量网络装机

Taishan office lecture: word error about inconsistent values of page margins

动态性能视图概述

Upgrade ecological proposition: what has Alibaba cloud brought to thousands of businesses?

Machine learning related competition website
随机推荐
C语言关键字extern
DevExpress.XtraEditors.DataNavigator用法
NFT数字藏品系统开发:文学+数字藏品的碰撞
Next item recommendations in short sessions
5. Multi table query
【uniapp】多种支付方式封装
PR subtitle production
IDEA快捷键
WCF deployed on IIS
从Boosting谈到LamdaMART
[daily question 1] 919. Complete binary tree inserter
WCF 部署在IIS上
HOT100 hash
Wrong Addition
:app:checkDebugAarMetadata 2 issues were found when checking AAR metadata: 2 issues were found when
排序:归并排序和快速排序
2019 ZTE touyue · model compression scheme
Hcip--- MPLS detailed explanation and BGP route filtering
Selenium: detailed explanation of browser crawler use (I)
Compose Canvas line chart