Screenshot errors with Espresso

Hello! I’m using Espresso for automated tests in Android, using the UiDevice takeScreenshot() method.

However, some of my screenshots work and some of them don’t. I’d say the majority of the screenshots I get only show the home screen.

Is there a reason for this? Is it possible that the tests are running so fast that the app is closing before the screenshot is taken?

Any help is appreciated, thanks!

Hi @blane-mdsol,

For reliable Espresso UI tests I’d suggest you to try our Virtual Device Testing feature, which runs the tests on Firebase Test Lab: https://blog.bitrise.io/introducing-solid-and-snappy-virtual-device-testing-for-android

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.