Missing the target by ThisParticularGreg is licensed under CC BY-SA 2.0
Retrofitting Espresso
You don’t need an IdlingResource
, and sleep()
is fickle. Make Espresso wait for your observables running on background schedulers with this one cool trick!
Stubbing your Android Intents
When we stub an intent, we are able to intercept it so the intent is never sent to the system, and specify how it should respond. This can be helpful in your Android tests when you need to know if an intent was sent, but you don’t actually need the Activity to start. This can be accomplished by using espresso-intents.
Testing for Android Intents Using Espresso
Using espresso-intents for testing Android Activity Intents