could someone give an example on how to upload a jpeg in gating?
I have placed a real image under the data folder in my IntelliJ Gatling project, but how do I refer the picture in the scala script?
Thanks
Magnus
could someone give an example on how to upload a jpeg in gating?
I have placed a real image under the data folder in my IntelliJ Gatling project, but how do I refer the picture in the scala script?
Thanks
Magnus
Hi,
I’m using the following code to PUT an image. Modify it as you wish.
`
.exec(
http(“Put Asset”)
.put("${resourcesRoot}/${rootCollectionName}/${assetName}")
.headers(authHeaders)
.body(RawFileBody(“botticelli2.jpg”))
.check(status.is(200), status.saveAs(“putAssetStatus”))
)
`
Ok, thanks,
But using the recorder it generates a request body like this:
----------------------------213246534733298150913569
Content-Disposition: form-data; name="message"
{
"insuranceNumber": "10043484",
"claimSequenceNumber": "31",
"authorIdentity": "0002130465",
"authorName": "{{customerName}}",
"customerPartRef": "0002130465",
"origin": "{{customerOrigin}}",
"personalIdNumber": "{{personId}}"
}
----------------------------213246534733298150913569
Content-Disposition: form-data; name="files"; filename="26"
Content-Type: application/octet-stream
����
Is it possible to refer the picture inside the reuest body somehow?
Magnus