roozbeh
(roozbeh aghili)
March 15, 2022, 7:50pm
1
I want to add a person on REST API using JMeter. Later, I want to perform a load test using this tool.
I’m referring to this document for creating my query: Sample REST calls - Documentation - OpenMRS Wiki
My query on JMeter looks like this:
The url, IP and port number are tested and performs ok.
Here I shared a picture of my localhost where OpenMRS is installed (on the same url written on JMeter).
https://drive.google.com/drive/folders/1RtapatHxCeNVbDQ-ET8qEIaCKsEvqJxI?usp=sharing
I think the problem is with my query, but I can’t find the right format of writing it.
ruhanga
(Nathan Ruhanga)
March 16, 2022, 8:59am
2
Hi @roozbeh , could you please refer to the OpenMRS REST API documentation for details?
roozbeh
(roozbeh aghili)
March 16, 2022, 3:28pm
3
Yes, I also checked with that. I even just copy-paste this sample:
{
"names": [
{
"givenName": "Mohit",
"familyName": "Kumar"
}
],
"gender": "M",
"birthdate": "1997-09-02",
"addresses": [
{
"address1": "30, Vivekananda Layout, Munnekolal,Marathahalli",
"cityVillage": "Bengaluru",
"country": "India",
"postalCode": "560037"
}
]
}
But it gives me 415 error:
HTTP Status 415 - Content-Type text/plain not supported
ibacher
(Ian Bacher)
March 16, 2022, 5:15pm
4
That error indicates that you need to ensure JMeter is sending the request with a content type of application/json
.
1 Like
roozbeh
(roozbeh aghili)
March 16, 2022, 6:06pm
5
Yes, I could fix it adding content type based on the following link:
json, post, jmeter
Thanks a lot
1 Like