无法通过jmeter将文件上传到S3 [英] unable to upload files to S3 through jmeter

查看:197
本文介绍了无法通过jmeter将文件上传到S3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过jmeter的PUT http请求将文件上传到S3.我在文件"部分的路径"和文件路径和MIME类型"中指定了URL.

I am trying to upload files to S3 through PUT http request from jmeter. I am specifying the URL in the 'Path' and 'file path and mime type in the 'Files upload' section.

我从S3收到访问被拒绝"响应.相同的URL通过Postman可以正常工作,并且上传成功.

I get 'Access Denied' response from S3. The same URL works fine through Postman and the upload succeeds.

对此有任何帮助吗?

推荐答案

鉴于您能够使用Postman成功上传文件,您只需使用JMeter记录相关请求即可.

Given you are able to successfully upload the file using Postman you can just record the associated request using JMeter.

  1. 准备进行记录的JMeter.最快,最简单的方法是使用 JMeter模板功能.从JMeter的主菜单中选择File - Templates - Recording,然后单击创建

  1. Prepare JMeter for recording. The fastest and the easiest way is using JMeter Templates feature. From JMeter's main menu choose File - Templates - Recording and click "Create

展开Workbench - HTTP(S) Test Script Recorder并单击开始"按钮

使用JMeter作为代理服务器运行邮递员,例如:

Run Postman using JMeter as proxy server like:

C:\Users\Jayashree\AppData\Local\Postman\app-4.9.3\Postman.exe --proxy-server=localhost:8888

  • 将需要上传的文件放入JMeter安装的"bin"文件夹中
  • 在邮递员中运行请求-JMeter应该将其记录在Test Plan - Thread Group - Recording Controller
  • Put the file you need to upload to the "bin" folder of your JMeter installation
  • Run the request in Postman - JMeter should record it under Test Plan - Thread Group - Recording Controller
  • 请参见 HTTP(S)测试脚本记录器文档欲获得更多信息.

    See HTTP(S) Test Script Recorder documentation for more information.

    这篇关于无法通过jmeter将文件上传到S3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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