As far as I read the source of Katalon Studio’s WS keywords, they are not well-designed and well-tested to process multipart/form-data.
- As the following post tells, it has a bug in String encoding.
I would not be surprised if they raise OutOfMemoryError when you try to upload a multipart/form-data that comprises with binary data.
-
I would rather advise you to stop using Katalon Studio if you seriously want to upload your files.
-
@wade.ward mentioned that he successfully uploaded the 2GB file using Postman. Then, @sahib.s.virk, why not you use Postman? ==> @Jass @duyluong
-
Katalon Studio bundles the Apache HttpClient libraries as
.classpathfile shows:
<classpathentry kind="lib" path="/Applications/Katalon Studio.app/Contents/Eclipse/plugins/org.apache.httpcomponents.httpclient_4.5.1.jar"/>
<classpathentry kind="lib" path="/Applications/Katalon Studio.app/Contents/Eclipse/plugins/org.apache.httpcomponents.httpcore_4.4.4.jar"/>
<classpathentry kind="lib" path="/Applications/Katalon Studio.app/Contents/Eclipse/plugins/org.apache.httpcomponents.httpmime_4.5.1.jar"/>
Therefore you can write a Groovy script in Katalon Studio that uploads files using the Apache HttpClient libs directly. I guess that approach would be rather hopeful.
- The following code is my sample Test Case script in my Katalon Studio project.
This code shows how to write a HTTP client using Apache HttpClient library that uploads 1.8GB file as mime multipart/form-data. This client worked for me. However the HttpServer that I wrote was dum, and Timeout occurred while transferring a large file of 1.8GB. I failed to finish uploading the file using this pair of client/server
, but I am not going to work on it any longer
Could you look into this?