I am using Karate 0.9.5 and trying to create a testcase for following curl command.
curl -X POST \
http://localhost:8082/v1/upload \
-H 'content-type: multipart/form-data’\
-H 'x-country: us' \
-H 'x-md5: <valid MD5> ‘\
-H 'x-userid: userName’\
--form 'fileName="file-test.xlsx"' \
--form 'file=@"sample.xlsx"'
Note:My file is in the same folder as in the feature file and I have given the absolute path. my other karate testcases with post calls works as expected
And my karate test is as follows and it does not works
Scenario: Testing the upload jobs
* headers file_headers
* url 'http://localhost:8082/v1/upload'
* multipart file myFile = { read:'sample.xlsx' , filename:'file-test.xlsx',contentType: 'multipart/form-data' }
* method post
* status 200