当前位置:网站首页>Jmeter性能测试之将每次接口请求的结果保存到文件中
Jmeter性能测试之将每次接口请求的结果保存到文件中
2022-07-26 07:31:00 【慕城南风】
在测试中,最好能够将测试时的接口返回数据保存下来,供以后需要的时候查看。
1、在Jmeter中,察看结果树的设置页面,手动输入要保存的文件路径即可,例如保存为d:\xxxx.xml

另外,还可以对保存的内容进行设置

2、名称上加上时间戳${__time(yyyy-MM-dd,)}
如果该jmeter脚本会被执行多次,每次都保存到这一个文件中显然不合适,那么每次都更换一个新文件名,又会很麻烦。
可以使用时间函数来实现,如上图所示,在文件名中加入时间函数,每次就动态生成带着时间戳的名字了。
例如名称带上日期,需要在名称中包含${__time(yyyy-MM-dd,)}
例如时间精确到秒,需要在名称中包含${__time(yyyy年MM月dd日-HH时mm分ss秒,time)}
3、如果需要其他的时间格式,可以使用函数助手,根据需要的时间格式,自己生成一个时间变量


点击生成并复制按钮后,该变量就已经被复制好啦,到察看结果树中文件名处,直接粘贴上就行了
4、如何查看上次的结果
1)重新创建一个线程组,添加一个查看结果树,在文件名处选择之前的某个测试结果文件,点击open

2)结果就会显示在结果树中啦
边栏推荐
- OVS underlying implementation principle
- 4、数据的完整性
- Leetcode:1898. maximum number of removable characters [if you want to delete some IDX from a pile of things, don't use pop]
- 0动态规划 LeetCode1567. 乘积为正数的最长子数组长度
- Fang Wenshan, Jay Chou's best partner, will officially announce "Hualiu yuancosmos" on July 25
- NFT数字藏品系统开发:华为发布首款珍藏版数字藏品
- Network trimming: a data driven neuron pruning approach towards efficient deep architectures paper translation / Notes
- 排序:归并排序和快速排序
- [200 opencv routines] 231. Gray level co-occurrence matrix (GLCM) for feature description
- 【uniapp】多种支付方式封装
猜你喜欢

Wrong Addition

WCF 入门教程二
![[C language] do you really know printf? (printf is typically error prone, and collection is strongly recommended)](/img/59/cf43b7dd16c203b4f31c1591615955.jpg)
[C language] do you really know printf? (printf is typically error prone, and collection is strongly recommended)

DCN (deep cross network) Trilogy

NFT digital collection development: Six differences between digital collections and NFT

系统架构&微服务

NFT数字藏品系统开发:华为发布首款珍藏版数字藏品

Comparison and difference between dependence and Association

NFT数字藏品系统开发:NFT数藏 的最佳数字营销策略有哪些

Speech at 2021 global machine learning conference
随机推荐
Compose text and icon splicing to realize drawableleft or drawableright
程序环境和预处理
[classic thesis of recommendation system (10)] Alibaba SDM model
什么是消息订阅和发布?
如何保证缓存和数据库的双写一致性?
1.MySQL架构篇【mysql高级】
In July, glassnode data showed that the open position of eth perpetual futures contract on deribit had just reached a one month high of $237959827.
OVSDB
DCN (deep cross network) Trilogy
MMOE多目标建模
「论文笔记」Next-item Recommendations in Short Sessions
Compose canvas custom circular progress bar
dcn(deep cross network)三部曲
This section is for Supplement 2
With someone else's engine, can it be imitated?
Next item recommendations in short sessions
元宇宙基础设施:WEB 3.0 chain33 优势分析
5. Multi table query
NLP自然语言处理-机器学习和自然语言处理介绍(三)
Simulation of transfer function step response output of botu PLC first-order lag system (SCL)