JMeter:在单个线程组中为每个用户使用多个CSV文件和多个HTTP采样器 [英] JMeter: Using multiple CSV files and multiple HTTP sampler for each User in a single Thread Group

查看:1028
本文介绍了JMeter:在单个线程组中为每个用户使用多个CSV文件和多个HTTP采样器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我要在JMeter中运行的方案:我有一个CSV文件(file1.csv),其中包含100个用户标识和密码.我创建了一个包含100个用户的线程组.我希望每个用户都从file1.csv中读取一行userId和密码.为此,我添加了一个CSV File Config元素.现在,我希望这些用户中的每一个都读取另一个包含500行的CSV文件(file2.csv).每行包含一个HTTP请求的参数.

The following is the scenario I want to run in JMeter: I have one CSV file (file1.csv) containing 100 userIds and passwords. I have created a Thread Group containing 100 users. I want each user to read one row of userId and password from file1.csv. For this I have added a CSV File Config element. Now, I want each of these users to read another CSV file (file2.csv) containing 500 rows. Each row contains parameters for a HTTP request.

因此,我希望每个用户从file1.csv的一行中读取一个设置的userId,密码,并使用该设置向用户发出Fire HTTP请求500次,每次读取file2.csv的每一行.

So, I want each User to read one set userId, password from one row of file1.csv and with that one set the User with fire HTTP request 500 times, each time reading each row of file2.csv.

您能告诉我如何在JMeter中进行设计吗?

Can you please tell me how to design this in JMeter?

推荐答案

我将使用以下测试计划结构来实现它:

I would implement it with the following test plan structure:

  • 线程组(100个线程)
    • 循环控制器(500次迭代)
    • HTTP请求
      • Thread Group (100 threads)
        • Loop Controller (500 iterations)
        • HTTP Request
          • CSV Data Set Config (to read HTTP Request parameters from File 2)
          • User Parameters PreProcessor with username and password variables populated with __CSVRead function.

          类似的东西:

          希望这会有所帮助

          这篇关于JMeter:在单个线程组中为每个用户使用多个CSV文件和多个HTTP采样器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆