Trying to wrap my head around ui testing on iOS. ...
# compose-ios
j
Trying to wrap my head around ui testing on iOS. I have some common testsI have a suite of ui tests in my commonTest source, which run fine on an Android emulator, however I can't say that I have found how to run the same ui tests on an iOS simulator. The first issue I stumble upon is this
Copy code
kotlin.IllegalStateException at /opt/buildAgent/work/b5c630f73501b353/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Throwable.kt:30
If I create just a dummy test, which does not have any of the app setup code (like Koin), then the test completes. so my questions are 1. Is my assumption wrong, that I can't run instrumented tests on iOS in the same way that I can for Android? 2. or is it possible, and it is just some issue with Koin (or something else in my code)
a
Hi! Just interested - why do you need to run instrumented tests instead of using Kotlin unit tests + UI tests with some multiplatform framework?
j
I want to make sure we have some sanity on the platforms that we support. So starting the app, step into some flow, land on some screen. For that we either need manual tests, or instrumented tests...right?
a
As far as I know, UI tests are designed to do so. There are several solutions that can do these tests in multiplatform.
j
Yes, and I can do so on Android, but seemingly not on iOS. I do not see the tests play out on the simulator in the way that I see it on the Android emulator
a
Unfortunately, android solutions do not suite well for iOS testing. I was talking about multiplatform solutions, like Appium.
j
Ah ok. Is that limitation clear in the docs? I might have missed it
And the ability to support this is not on the horizon?
a
We aware about it, and looking for proper solution. For now there is no timeframe. I would say that instrumented tests is not something usual. In most cases, unit tests + multiplatform UI tests frameworks is the way to go.
Also, here you can take a look how we're running instrumented tests on iOS. But to be clear - it's not something that designed to test the application for ui-testing.
👍 1
j
Yeah I'm not too fussed about testing the application, more so a sanity that the codebase compiles, runs, opens and adds a few steps, per platform. That way we can focus the main effort, 95%, on common uitests
Will have a look at what you shared. Thanks for engaging. I assume there is no placeholder issue to follow on youtrack for the missing iOS support?
a
Not for now - you can file one if you want. Please ping me there.
👍 1