当前位置:网站首页>jmeter中csv参数化
jmeter中csv参数化
2022-06-25 08:08:00 【fish_study_csdn】
Jmeter参数化的方式大概有4种用户定义的变量、用户参数、函数助手、csv文件配置。用户定义的变量与用户参数,两者的用法相似,但用户定义的变量一般作用于脚本全局,用户参数一般用于局部请求;函数助手与CSV文件配置适合大批量参数化,在性能测试中比较常用。
jmeter中csv参数化,先创建一个csv文件(参数与参数之间用逗号隔开,英文逗号)。
中文逗号是无法将参数分割开的,就会默认 为一个参数来处理。
内容编辑完成后写成保存csv文档,当然其他扩展名也可以,比如txt
1 创建csv文件
2、进入jmeter中,在线程组中右键添加--配置元件--csv数据文件设置
3、将设置的变量配置到运行脚本中
配置变量是:美元$符号+大括号{变量名} 。比如:${username}
这儿的变量名要与步骤2设置的变量名称一致
4、添加查看结果输和http默认请求值
5、 进入线程组中设置线程数,设置为6(因为除了首行外,有6条数据)
6 、 运行并察看结果树
正确的:
错误的:
每个线程读文件中的一行数据执行请求
边栏推荐
- A 35 year old Tencent employee was laid off and sighed: a suite in Beijing, with a deposit of more than 7 million, was anxious about unemployment
- Emergency administrative suspension order issued Juul can continue to sell electronic cigarette products in the United States for the time being
- atguigu----17-生命周期
- Easyplayer streaming media player plays HLS video. Technical optimization of slow starting speed
- tp6自动执行的文件是哪个?tp6核心类库有什么作用呢?
- Unity--configurable joint -- a simple tutorial to get you started with configurable joints
- 如何成为一名软件测试高手? 月薪3K到17K,我做了什么?
- 获取扫码的客户端是微信还是支付宝
- Hyper-v:Hyper-v 第 1 代或第 2 代虚拟机
- 35岁腾讯员工被裁员感叹:北京一套房,存款700多万,失业好焦虑
猜你喜欢
cazy长安战役八卦迷宫
Check whether the point is within the polygon
Unity--Configurable Joint——简单教程,带你入门可配置关节
Lvs-dr mode multi segment case
获取扫码的客户端是微信还是支付宝
四、卷积神经网络(Convolution Neural Networks)
Getting to know the generation confrontation network (11) -- using pytoch to build wgan to generate handwritten digits
City Chain technology platform, really Realizing value Internet reconstruction!
如何设计测试用例
LVS-DR模式多网段案例
随机推荐
Analysis of a video website m3u8 non perceptual encryption
三、自动终止训练
wav文件(波形文件)格式分析与详解
进击的技术er,遇见实习岗位信息
SharePoint:SharePoint 2013 with SP1 简易安装
How safe is the new bond
C language: bubble sort
在华泰证券上面开户好不好,安不安全?
UEFI: repair efi/gpt bootloader
¥3000 | 录「TBtools」视频,交个朋友&拿现金奖!
打新债真的安全吗? 风险大吗
Similarity calculation method
Discrimination of configuration, software configuration items and software configuration management items
City Chain technology platform, really Realizing value Internet reconstruction!
Is it really safe to pay new debts? Is it risky
《树莓派项目实战》第五节 使用Nokia 5110液晶屏显示Hello World
Unknown table 'column of MySQL_ STATISTICS‘ in information_ schema (1109)
各种同步学习笔记
GPU calculation
关于I/O——内存与CPU与磁盘之间的关系