I need to mock multiple http calls for integration...
# ktor
j
I need to mock multiple http calls for integration tests. What’s the best way to do it? I’m using Ktor + Kotest
c
There’s a mock engine available, which simulates the network calls without actually hitting the network https://ktor.io/docs/http-client-testing.html
a
Depending on how you’ve built your server and how it’s used in tests, you can use the
externalServices
block in a
ApplicationTestBuilder
or pass around a client with
MockEngine
installed.
👍 1
j
Got it working with my app, thanks guys!