Jmter HTTP2采样器的文件上传支持 [英] File Upload support of Jmter HTTP2 sampler

查看:119
本文介绍了Jmter HTTP2采样器的文件上传支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用HTTP2采样器中的文件上载"选项来对支持不同消息大小的HTTP2的服务器进行负载测试.

I would like to use the "File Upload" option in the HTTP2 sampler to load test a server that supports HTTP2 with different message sizes.

为此,我尝试了HTTP2采样器中的文件上载"选项,并观察到当我们在其他采样器上移动时,为文件路径"提供的路径被删除了,因此无法使用文件上载

I have tried out the "File Upload" option in the HTTP2 sampler for this and observed that the path provided for the "file path" getting removed when we move across the other samplers, therefore it's not possible to use the file upload option in the HTTP2 sampler.

移动到另一个采样器后,删除了文件路径".

After moving to another sampler, "file path" got removed.

我可以知道在使用HTTP2采样器时如何发送不同的文件作为POST请求的有效负载吗?

May I know how can send different files as payload of the POST request when using HTTP2 sampler?

我正在使用Apache Jmeter 4.0.

I'm using Apache Jmeter 4.0.

谢谢.

推荐答案

作为解决此问题的方法,我们可以在Jmeter中使用" __ FileToString "功能.

As a workaround for this issue we can use "__FileToString" function in Jmeter.

例如: $ {__ FileToString($ {__ P(payload)} ,,)}

这篇关于Jmter HTTP2采样器的文件上传支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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