While testing negative test cases with Jmeter, it is required to PASS the FAILED HTTP requests. This can be achieved by 2 ways.
- You can use the Beanshell/Groovy code.
- You can use the Response Assertion.(looks easy to me)
Here, I will show you how to use Response Assertion to pass the failed HTTP requests.
In case, you want all the HTTP requests to be PASSED, you can use only single Response Assertion in your script. However, if there are cases where some of the HTTP requests, if they get fail, should be marked as FAILED out of many HTTP requests. In that case, you should use Response Assertion element as child of each HTTP request for which you want to mark it PASSED.
Response Assertion can be found here
In order to PASS the FAILING requests, you have the enable the 'Ignore Status' checkbox of Response Assertion element and then use it accordingly. See below screenshot.