How can I test my Ktor client WebSocket code? Do I...
# ktor
u
How can I test my Ktor client WebSocket code? Do I need to fake the WebSocket implementation, or can I swap in a lower-level component for tests, sort of like the mock engine for http?
s
We have looked at something like this which essentially gives you a pair of a client and server engine that talk to each other. So then you can write a ktor server to setup a websocket server and test your clients against that
a
You can use the testApplication to test the interaction through WebSockets.