0
votes

enter image description hereI have a query on Jmeter web socket sampler. I have used sampler (https://bitbucket.org/pjtr/jmeter-websocket-samplers)

I am trying to Test a scenario when I send invalid request then I should handle the error or if there is any error thrown by server then I should verify.

but in Jmeter I am not receiving any server error, it shows green all the time irrespective of valid or invalid request for web socket sampler. Please suggest how to handle this?

Best Regards, Sunil enter image description here

1
Can you show your test plan and error return for exampleuser7294900
Your second image shows the result of Maciej Zaleski's plugin which is not compatible with the plugin your are referring to (bitbucket.org/pjtr/jmeter-websocket-samplers) and which is origin of the first image. So it seems you are using both plugins at the same time, which can be very confusing (both for you and the people trying to help you ;-)).Peter

1 Answers

1
votes

Add a Response Assertion as a child of the WebSocker Sampler to check its status code, message, content, whatever.

If you need specific instructions kindly update your question with example "successful" and "error" responses, both Sampler result and Response data tabs.

See How to Use JMeter Assertions in Three Easy Steps article for more information on adding pass/fail criteria to your tests via JMeter Assertions.