Sorry, but this is not possible.
Please read this Google link: Automating UI Tests
Espresso, Robotium, Calabash, and other UI test environments were created for short interaction testing events. It imitates the behavior of a specific user - run the application, do some tricks and (if successful) close the application.
Of course, Espresso allows you to create your own idle resources and then register them in the app.
The easiest way to put a test to sleep at a specific time is to use the Thread.sleep(time_in_miliseconds) method, but, as I said, this contradicts the idea of โโautomatic testing.
source share