我的文件大小在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
的回应。