Reputation: 417
I'm still somewhat new to JMeter and not a programmer by trade. (I'm typically a BA/QA who happens understands OO programming and taken a few programming courses.) I'm performing API testing through REST service calls to/from our multi-tenant database.
I'm attempting to perform IMPORT through JMeter and am having difficulty. I'm able to successfully do it through REST clients like Postman and Advanced REST Client, but when I attempt to configure it in JMeter, it fails.
In Postman, the configuration is:
This is successful 100% of the time, as shown in the database.
In JMeter, I'm trying to replicate the configuration as follows:
HTTP Header Manager
HTTP Request
For MIME Type, I've tried "application/vnd.ms-excel", "vnd.openxmlformats-officedocument.spreadsheetml.sheet", and null - all with no success.
I've tried adding additional Header values in various combinations with no success:
Any thoughts, comments, insight, possible solutions, are appreciated.
Upvotes: 0
Views: 754
Reputation: 168147
When you have inconsistencies w.r.t JMeter and browser or other tools the best way to figure out the differences is capturing requests from both JMeter and browser (or other tool) with a sniffer like Wireshark, detect and work around the differences.
In regards to your case, in JMeter:
Content-Type: multipart/form-data
header)In HTTP Request:
Use multipart/form-data for POST
application/vnd.ms-excel
See Performance testing: Upload and Download Scenarios with Apache JMeter article for detailed instructions on how to properly simulate file operations in your JMeter test
Upvotes: 1