I am looking at the nonblocking, but I am not sure...
# http4k
a
I am looking at the nonblocking, but I am not sure how to test this. according to https://www.http4k.org/cookbook/websockets/ you can do
testApp.testWsClient
but I need something like
testApp.testWebsocket
d
sorry - not quite understanding what you're trying to do - so will ask questions until I do! 🙂
1. what's the test that you're trying to write? Are you testing the server-side of the ws or the client side?
a
I try to test client side, and that it responses properly to messages. From the documentation I liked that you could use it for integration and unit testing
d
clarification: are you testing from the client-side (so you're testing a server-side socket), or you are trying to test the client side (eg. so you're injecting the websocket into another class)?
a
I am trying to test client. I am injection a
Websocket
into a class
d
ok - we don't currently provide a test Websocket implementation for testing the clientside of the websocket. We only provide the tools for testing a server-side websocket
So you'll need to write your own test version of the interface
a
Ok clear, thanks. I will do that
d
np 🙂