Espresso test fails with NoActivityResumedException often

后端 未结 6 2110
既然无缘
既然无缘 2021-02-06 21:58

EDIT: Updated description and error message and added some images. Still have this problem.

I have a strange error that occur many times when running espresso tests. Af

6条回答
  •  -上瘾入骨i
    2021-02-06 22:38

    One possible cause of this is the tests are running in parallel. Use --no-parallel.

    Example --> gradlew connectedLiveDebugAndroidTest --no-parallel

    It this happens only when running all of them from the console or sequentially, but doesn't happen running them individually then chances are they are running on parallel o the same device. Two different Espresso tests running on the same device at the same time make them flaky and prone to fail.

提交回复
热议问题