Slide 50
Slide 50 text
MultipleDevices — parallel runTests
override fun runTests(...): Boolean = runBlocking {
val devices = device.devices.get()
devices
.map { it.splitIntoHostAndPort() }
.mapIndexed { index, (host, port) ->
// OK to use for IO-bound.
// For CPU-bound tasks: Gradle Worker API
async(Dispatchers.IO) {
runShardedTest(index, devices.size(), host, port, ...)
}
}
.awaitAll()
.all { it }
}
DroidKaigi 2026
50