Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP: file uploads #106

Closed
hassy opened this issue Jun 1, 2016 · 6 comments
Closed

HTTP: file uploads #106

hassy opened this issue Jun 1, 2016 · 6 comments

Comments

@hassy
Copy link
Member

hassy commented Jun 1, 2016

It would be nice to have better support for file uploads.

At the moment, the contents of the file to be uploaded needs to be embedded directly into the Artillery script. It should be possible to reference external files to be read at runtime.

@pooolz
Copy link

pooolz commented Aug 4, 2016

my team would love for this to be implemented so that we can load test our file uploader using artillery by uploading a file from disc

@armand1m
Copy link

+1 on this.

@mauris
Copy link

mauris commented Aug 16, 2017

It seems like this requires modification to the HttpEngine in artillery-core repository. Perhaps script can take in a files key of :field => :pathnames. e.g.:

  - post:
    url: "/pets"
    files:
      picture: "/tmp/picture.jpg"
    json:
      name: "Mali"
      species: "dog"

The contents of /tmp/picture.jpg can be read and uploaded in HttpEngine. The code will have to detect the presence of files key and ensure that upload is done in multipart/form-data format.

@sosloow
Copy link

sosloow commented Jun 7, 2018

Seems, like there was a pull request merged with this feature in the original artillery-core repo artilleryio/artillery-core#148 but it was reverted for some reason.

Can we get some reasoning behind this? Maybe we can update this pull request so it will be ok to merge?

@hassy
Copy link
Member Author

hassy commented Jun 7, 2018

@sosloow that change was reverted because the code did not quite work. More details here: #265

It should be fairly straightforward to re-use some of the code in #265 to create a plugin to add file uploading support to HTTP scenarios. It'd be great if someone spent some time on it and shared the result with the community.

An option for teams that need file uploading functionality that just works today is to use Artillery Pro. It has support for file uploads, both for testing from one machine and when running distributed tests from a cloud cluster (on AWS ECS).

@sosloow
Copy link

sosloow commented Jun 8, 2018

Thanks for clarification. For now, I found that file uploads via custom scripts are pretty straightforward.

Here's an example someone posted earlier: #320 (comment)

@hassy hassy closed this as completed Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants