0

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

2
  • Can you show your test plan and error return for example Commented Dec 5, 2017 at 6:50
  • 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 ;-)). Commented Feb 1, 2018 at 20:24

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Hi,Thanks for the reply, i have attached Response Data screenshot. Getting the same response data in case of successful as well in case or error. Please have a look and suggest how to differentiate between successful and error case.
Also added SampleResult screenshot
In case if the image is not visible then please have a look at the images under link given : blazemeter.com/blog/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.