Is anyone aware of an mpp http/s server? The useca...
# multiplatform
t
Is anyone aware of an mpp http/s server? The usecase is mock web server deployable to android/iOS/node to try and make things a bit more self contained in a test pipeline.
c
Ktor will be supported on native “soon”, though they did not give a specific timeline https://kotlinlang.slack.com/archives/C0A974TJ9/p1591271987215400?thread_ts=1591271350.214700&cid=C0A974TJ9
🎉 1
s
There is also a ktor mock client that is useful in testing.
t
the catch there is I am wanting something that doesn't require that we are using ktor as the client.
c
Do you need the server running in-process? It might be easier to just start/stop a server and point your tests to localhost as part of the CI scripts
t
yeah goal is in process or at least on device. currently they are hitting a docker container in the same data center but behind a vpn. the VPN is a big limiting factor in what device farm options are available, so elastic scaling of such a test suite becomes very painful
in a roundabout way, even hitting a mocked portable environment right now, things still end up very "end to end" ish. trying to bring it all in to a more hermetic solution.
c
Perhaps wrapping your service layer in an API-agnostic way would be better? Instead of application code hitting the networking APIs directly, they hit an injected service interface which can be swapped out for mocked/hardcoded responses in tests
t
haha that is my ideal solution to get to, unfortunately I am finding myself having to play the political game to do any of this. basically I am trying to find a decent intermediate step from where we are towards just mocking my retrofit services. The other hard bit is the existing test suite is appium so no nice instrumentation hooks.