I'm creating a load test with JMeter. I'm trying to make a Post request to create a new resource but it always responds with 500 error, even though I'm sending the same headers and parameters as the browser and I also tried with postman and it works fine, it's just with JMeter that's not working.
The script was recorded with the BlazeMeter Chrome extension and adjusted as needed.
The next configurations are for the Test Plan in general:
- HTTP Header Manager with the header "User-Agent".
- User Defined Variables with only one variable "BASE_URL_1".
- HTTP Request Defaults with the "Retrieve All Embedded Resources" and "Parallel downloads" selected and "Number" set to 6.
- DNS Cache Manager with "Clear cache each iteration" selected and "Use system DNS resolver".
- HTTP Authorization Manager with nothing selected.
- HTTP Cookie Manager with "Clear cookies each iteration?" selected.
- HTTP Cache Manager with "Clear cache each iteration?" selected and "Max Number of elements in cache" set to 5000.
I set the "CookieManager.save.cookies" option to "true" in "jmeter.properties".
Here's an image of what the "HTTP Request" looks like:
Inside the "HTTP Request" there's a "HTTP Header Manager" with the next headers:
Inside the "HTTP Request" there's also a "Uniform Random Timer" with "Random Delay Maximum" set to 26344.0 and "Constant Delay Offset" set to 13172.
The cookies seemed to be sent fine with the session data. I do log in a user and get the session data before attempting to do the post request and other get requests work fine under the same session. I teste this same headers with Postman and it worked. I have no idea why this is not working in JMeter. I tried doing several changes to the configuration without success. This is a .NET service.
The API is not built the best way, but what makes me think that this 500 error might be from JMeter and not the API is that I was able to successfully make the request from postman.
Anyone has an idea of what could be wrong on the test config?
EDIT
Here are some images from the View Results Tree:
The Response Body is HTML saying that there's an error.