dave08
11/10/2025, 10:28 AMOliver.O
11/10/2025, 11:35 AMGoogle is deprecating theBut it can work if every detail is configured carefully. It worked last time with your local tests. Are you now trying to run a device (instrumented) test, where • the dependency must be configured differently, and • the IDE plugin does not yet support gutter icons?plugin in favor ofcom.android.application. Android-KMP integration is currently a moving target and there are multiple issues, so please test if it meets your needs.com.android.kotlin.multiplatform.library
dave08
11/10/2025, 11:36 AMdave08
11/10/2025, 11:36 AMOliver.O
11/10/2025, 11:37 AMdave08
11/10/2025, 11:39 AMval SuggestionAwarePlayerServiceTest2 by testSuite {
class Context {
val fakeDelegate = FakePlayerService()
val repo = object : SuggestionsRepository {
override suspend fun getSuggestedStreams(
basedOn: StartedFrom,
currentQueueSize: Int,
limit: Int
): List<Stream>? = null
}
val suggested = listOf(sampleStream(100), sampleStream(101))
val service = SuggestionAwarePlayerService(fakeDelegate, repo)
}
@TestRegistering
fun test(name: String, action: suspend Context.() -> Unit) =
this.test(name) { Context().action() }
test("when startedFrom is provided and streams empty, seeds from suggestions") {
// Initially empty
assertEquals(PlayerQueue.EMPTY, service.currentQueue.value)
// Call with startedFrom but no streams
val startedFrom: StartedFrom = CollectionRef(10, StreamContainerType.ALBUM, "A", "", true)
service.setQueue(startedFrom, emptyList())
// Should set queue to suggestions with same startedFrom
assertEquals(PlayerQueue(startedFrom, suggested, 0), service.currentQueue.value)
}
}Oliver.O
11/10/2025, 11:43 AMdave08
11/10/2025, 11:44 AMdave08
11/10/2025, 11:45 AMOliver.O
11/10/2025, 11:50 AMOliver.O
11/10/2025, 11:51 AMdave08
11/10/2025, 11:55 AMOliver.O
11/10/2025, 12:00 PMdave08
11/10/2025, 12:05 PMGoogle is deprecating theit should be com.android.library? And also it might be nice to mention this caveat for application test that don't have gutter icons there (so people like me don't assume test balloon not working...).plugin in favor ofcom.android.application. Android-KMP integration is currently a moving target and there are multiple issues, so please test if it meets your needs.com.android.kotlin.multiplatform.library
dave08
11/10/2025, 12:06 PMOliver.O
11/10/2025, 12:12 PMcom.android.application separately. Fortunately, TestBalloon's list of open issues is small, so you can easily see existing limitations.
The current recommendation by Google is to use only com.android.kotlin.multiplatform.library with KMP, and create a separate non-KMP module with com.android.application, importing from KMP modules as necessary.dave08
11/10/2025, 12:13 PMdave08
11/10/2025, 12:15 PMOliver.O
11/10/2025, 12:17 PM