Jmeter(5)Jmeter CSV参数化案例
Jmeter CSV参数化案例
下面以注册xiaoqiangshop
账户为例,进行一次CSV参数化的演示:
CSV参数化学习链接:https://www.cnblogs.com/wwho/p/7292006.html
6.1新建CSV Data Set Config
6.2填写配置信息
6.3创建csv文件
在设置的jmx文件的保存路径,新建txt
文件,修改为.csv
文件(或者新建一个excel文件,然后另存为csv
文件格式),输入一下内容:
jimmy,83434532@qq.com,4352342698,453335@qq.com,53434565,6546454,2343653,18283564454,guangdong
krystal,84343892@qq.com,426234258,44535435@qq.com,53486565,655654,2343553,18448454,guangdong
bod,8324262@qq.com,4232453298,4745634345435@qq.com,5352365,6546454,234363,1828348454,guangdong
sunny,832346892@qq.com,42354376348,4534543435@qq.com,5234365,6546454,2343453,18454554,guangdong
velyn,83247392@qq.com,4245437638,4534535@qq.com,53454365,3456454,2343653,1548454,guangdong
trevor,83254353@qq.com,4454376456456,45345435@qq.com,5653365,6546454,2343343,1824548454,guangdong
Alex838767492@qq.com,42534538,45345335@qq.com,53454365,64534,2343653,182845354,guangdong
6.4设置线程组循环次数
把线程组的循环运行次数设置为2:
6.5可新建一个Debug Sampler调试取样器
Debug Sampler
主要是为了方便我们查看参数化的对应变量的取值。
6.6抓包并配置请求信息
想要引用CSV Data Set Config
里面设置的变量的语法是:${变量名}