JMeter how to NOT fail 500 Internal Server Errors

前端 未结 4 1968
梦如初夏
梦如初夏 2020-12-08 00:47

I am using JMeter as a unit test tool, in parameterised calls where I expect some of the responses to be 500 internal server errors. I am using BeanShell Assertions to chec

4条回答
  •  青春惊慌失措
    2020-12-08 01:20

    Another possible solution is to use Response Assertion with checked "Ignore Status" flag added to your sampler:

    Ignore status
    Instructs JMeter to set the status to success initially.

    The overall success of the sample is determined by combining the result of the assertion with the existing Response status. When the Ignore Status checkbox is selected, the Response status is forced to successful before evaluating the Assertion.

    HTTP Responses with statuses in the 4xx and 5xx ranges are normally regarded as unsuccessful. The "Ignore status" checkbox can be used to set the status successful before performing further checks. Note that this will have the effect of clearing any previous assertion failures, so make sure that this is only set on the first assertion.

提交回复
热议问题