JMeter处理大文件的上载

时间:2019-05-02 10:34:42

标签: soap jmeter base64

我的文件大小在50-100 MB之间。我尝试使用SOAP编码形式的JMeter将它们发布到Base64 Web服务。我使用以下代码对其进行编码。

File file = new File(vars.get("filename"));
byte[] bytes = Files.readAllBytes(file.toPath());
vars.put("fileBytes", Base64.encodeBase64String(bytes));

编码成功,我得到了字符串,但是JMeter在执行期间冻结。它使用1 GB内存,线程正在运行(无法停止它),但似乎什么也没发生,我等了30分钟。 我尝试将文件附加到HTTP Request中,

<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="attach1"/>

我得到了HTTP 500的回应。

0 个答案:

没有答案
相关问题