---
title: "jmeter压测带参数"
author: "e_e"
date: "2025-05-13T13:52:09Z"
tags: []
categories: ["编程语言"]
slug: "jmeter"
draft: false
lastmod: "2025-05-13T13:52:09Z"
id: 2540275
url: "https://e-e.iteye.com/blog/2540275"
---

1.找到jmeter bin目录，双击jmeter.bat文件，打开jmeter

2.创建线程组

3.线程组下面创建request

protocol: http

Server Name or IP: api-gateway.fat-traefik.vcredi-t.com.local

method : get/post

path: /api/telemarket/import/calldata/flowImport

content encoding : utf-8

body Data:

```
{
  "productName": "豆金",
  "productCode": "DQ",
  "stage": "JJDD",
  "registerId": "${param}",
  "decisionCompleteType": "BATCH_DECISION_COMPILTE",
  "strategyLabel": "NEED_DIST_95"
}
```

 

4.在线程组下面创建Csv Data Set Config，使用文本编辑器，表头指定跟参数${param}一致

指定两个参数文件格式如下：

param

7908034843204389088,

5432543546768787989,

 

5.线程组右键找到：HTTP Header Manager，添加Header

Content-Type  ： application/json;charset=UTF-8

 

6\. 线程组 listener 添加 View Result Tree, 执行后在这里看请求结果