0

I'm working on a project where I am being required to automate some tests using JAVA. I need to validate that an event message is being received each time that an action is performed.

I asked the developer about it and told me the messages are sent in a payload each time an action is done (eg. click on a button) and is being sent through websockets.

I'm kind of new since I used to be a manual tester, but is it possible to get those messages?

JG3ro
  • 1
  • We need to see the code in question. – Quazi Irfan Dec 08 '21 at 20:30
  • The server does the receiving, so you can't do that client side. You'd need access to the server-side code to verify that a message was received from the client. (which is where Selenium is... it controls the browser which is the client) If there is a response back from the server that is processed and populated in the DOM you can check that client-side. In general, websockets would be used for things like chats or other multi-user interactions. – pcalkins Dec 08 '21 at 20:42
  • You could collect what's going out of the client, but that does not guarantee that the server received it. "Wireshark" might be good for that. Did they at least give you a format/structure for the data being sent here? – pcalkins Dec 08 '21 at 20:47
  • I found some code here that would at least check for websocket received, websocket sent on the client side. Local and remote webdrivers have different methods for this: https://gist.github.com/sahajamit/c2d6827736f2b267a8d08c41e559ad24 – pcalkins Dec 08 '21 at 21:24

0 Answers0