具体请参考一位大佬的博文:使用jmeter进行api接口压力测试
(我只是把照着做并操作步骤记录了下来)

操作视频

(暂未录制)

新建测试计划

管理一组测试
jmeter做api简单压测

新建线程组

模拟有多少人操作
jmeter做api简单压测
jmeter做api简单压测
其中,
Ramp-Up时间(秒):间隔多长时间启动1个线程,直到创建1000个线程;如果为0的话,则在开始测试后立刻创建1000个线程。

添加http请求

http请求
jmeter做api简单压测
jmeter做api简单压测

添加请求头管理器

设置请求内容类型
Content-Type:application/json
jmeter做api简单压测
jmeter做api简单压测

添加监听器-察看结果树

看请求的结果
jmeter做api简单压测

添加监听器-汇总报告

看测试报告
jmeter做api简单压测

执行后查看结果

jmeter做api简单压测
jmeter做api简单压测

相关文章: