Единственное, чего я не понимаю, это то, почему похоже, что базовая генерация запускается несколько раз.
Если я создаю путь пользователя, я Сначала пройдите немного адаптации, но это только в первый раз. На следующей итерации тесты ждут на первом экране и выполняются в течение тайм-аута.
Код: Выделить всё
@Test
fun generate() {
// The application id for the running build variant is read from the instrumentation arguments.
rule.collect(
packageName = InstrumentationRegistry.getArguments().getString("targetAppId")
?: throw Exception("targetAppId not passed as instrumentation runner arg"),
// See: https://d.android.com/topic/performance/baselineprofiles/dex-layout-optimizations
includeInStartupProfile = true
) {
// This block defines the app's critical user journey. Here we are interested in
// optimizing for app startup. But you can also navigate and scroll through your most important UI.
// Start default activity for your app
pressHome()
startActivityAndWait()
goThruOnboarding()
Спасибо!
Подробнее здесь: https://stackoverflow.com/questions/785 ... -explained
Мобильная версия