How to handle file upload in completed API testing?
like you need to use post (/ url) and then upload the file by a specific parameter.?
Hope this helps, works great for me
given(). multiPart(KEY, new File(testfile)). formParam(KEY, testfile). contentType("multipart/form-data"). expect(). body("user.name", equalTo(someuserdata)). when(). post(yourapihere);
You can send Multipart data. For the Detention, its documented here: http://code.google.com/p/rest-assured/wiki/Usage#Multi-part_form_data
https://techndeck.com/how-to-upload-file-using-rest-assured/
.
, .