0

I'm using robot framework as a testing framework. one of my usecases is to upload a zip file using POST request.

I created the right command for uploading a local file, it works perfectly. However, I want to take it to a bit more flexible approach.

Instead of download the file to my computer and uploading it, I want to give a URL with holds the file I'm about to upload.

Meaning, giving it the url http://X.X.X.X/test.zip.

My main problem is that I need to figure out a way to read the binary chunk and send it to the API.

In python it's easy doing it with using urlopen (Stream large binary files with urllib2 to file), but I didn't found any way of doing it in robot.

Do you have any idea?

Bence Kaulics
  • 7,066
  • 7
  • 33
  • 63
ForMartha
  • 107
  • 1
  • 10

1 Answers1

0

If you already know how to do it in Python, then you could just as well write your own library to do it. Just check out the Creating Test Libraries section of the user guide.

Verv
  • 2,385
  • 2
  • 23
  • 37
  • I agree that it can be done. However, I'm into using same library convention and not repacking something from scratch.. – ForMartha Jan 08 '18 at 13:42