1
votes

I already made Response Code 422 as a success http request in jmeter with Response Assertion, and it works. But jmeter assign Response Code 200 as a failed http request.

I add 422 and 200 in Pattern to test but jmeter only assert Response Code 200 as a success http request.

How assign Response Code 200 OR 422 as a success http request?

regards, Stefio

3

3 Answers

4
votes

200|422

The pipe character | is the OR operator

In general, you can use perl5 regular expressions in JMeter

0
votes

You can also use a beanshell post processor to write a short beanshell script to change the status from "fail" to "pass" if the code is 422.

-1
votes

Assert the text/Response code by using Response Assertion. Click here Image for solution.