使用Jmeter调用API时如何传递表单数据? [英] How to pass form-data while calling API using Jmeter?
本文介绍了使用Jmeter调用API时如何传递表单数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用Jmeter进行API调用.
在我的API调用中,我正在发送带有请求的文件,并且我需要将文件名指定为表单数据.
例如当我从邮递员调用相同的API时!
当我从Jmeter进行上述调用时,如何指定文件名?
Jmeter呼叫:
解决方案
的详细说明和配置说明,请参见指南.
I want to make an API call using Jmeter.
In my API call, I'm sending a file with a request, and I need to specify the file name as form-data.
e.g. when I call the same API from postman !
How do I, specify a filename when I make above call from Jmeter?
Jmeter call :
解决方案
HTTP Request Sampler provides options to
- set
Use multipart/form-data for HTTP POST
- send files with the request
See Performance testing: Upload and Download Scenarios with Apache JMeter guide for detailed explanations and configuration instructions.
这篇关于使用Jmeter调用API时如何传递表单数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文