Reputation: 33
For one of my Requests in jmeter, I am getting Response code as 200 OK but Response body is NULL. Due to this "Response Assertion" is failing since we are expecting Response to generate. Here i am unable to get as to why the status code is 200 even though Response body is null.
Sampler result showing Response status as 200
Upvotes: 2
Views: 4841
Reputation: 168002
If you're expecting HTTP Status Code to be 200 and not interested in the body - amend your Response Assertion configuration as follows:
Response Code
Equals
200
This way your assertion will pass.
Check out Response Assertions in JMeter 3.2 - New and Improved article for more information on using Response Assertion to conditionally mark Samplers as passed or failed
If you expect the request to return some body data - then assertion failure is correct and I can think of the following options:
Upvotes: 1