Jmeter(5)Jmeter CSV参数化案例

Jmeter CSV参数化案例

下面以注册xiaoqiangshop账户为例,进行一次CSV参数化的演示:

image-20200824181150107

CSV参数化学习链接:https://www.cnblogs.com/wwho/p/7292006.html

6.1新建CSV Data Set Config

image-20200824181427284

6.2填写配置信息

image-20200824182246740

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:

image-20200824191636437

6.5可新建一个Debug Sampler调试取样器

Debug Sampler主要是为了方便我们查看参数化的对应变量的取值

image-20200824192643088

6.6抓包并配置请求信息

image-20200824193617326

想要引用CSV Data Set Config里面设置的变量的语法是:${变量名}

image-20200824193701368

6.7运行并查看结果

image-20200824193902728

image-20200824193920419

posted @ 2020-08-26 23:57  Whatever_It_Takes  阅读(358)  评论(0编辑  收藏  举报