I have been using JMeter for a while and only for load tests. I was wondering if I can use it for ordinary functionality testing.
For example: I have a malformed XML and an application returns 400 Bad Request
which I expect to be returned - so it's correct but JMeter resolves it as a failure.
I tried Response Assertions but it didn't work...
Is this possible with JMeter?
Additionally, HTTP status 400 bad request error can happen when the web browser sends cookie data that's too large. In this case, the error message appears as 400 Bad Request – Request Header Or Cookie Too Large. Try clearing your browser cache and cookies to solve this problem.
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, or deceptive request routing).
As per 400 Bad Request description: So most probably you're sending malformed requests which server doesn't understand. As soon as you amend your JMeter test plan to 100% match requests which are being sent by the real browser it should start working. Don't forget about Cookies and Headers.
A 400 Bad Request, also known as a 400 error or HTTP error 400, is perceived by the server as a generic client error and it is returned when the server determines the error doesn't fall in any of the other status code categories.
To test a non 200 response code, you must check the 'Ignore Status' field in the Response Assertion. Without this, the test will always fail regardless of the response assertion.
So here is what you need to do to test the http response code 400:
Add a new Response Assertion. Set the following assertion properties:
Done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With