Guys,
I am trying to upload a pdf through Gatling test.
My configuration :
val fileName: Expression[String] = "/Users/FormVat51Sample.pdf"
val post = h.post(pageUrl).headers(multiform_platformHeaders)
.check(noValidationErrors)
.check(saveFormSession)
.check(saveVersion)
.check(notOnLoginScreen)
.formParamMap(params)
.asMultipartForm
.bodyPart(RawFileBodyPart("file", fileName).contentType("application/pdf").fileName("FormVat51Sample.pdf").transferEncoding("binary"))
The Exception I am getting at the server side:
‘org.springframework.web.multipart.MultipartFile’ for property ‘multipartFile’; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [org.springframework.web.multipart.MultipartFile] for property ‘multipartFile’: no matching editors or conversion strategy found]
Please respond.
Thanks
Babu