I am new for Junit testing framework. Is it possible to test a flow of activities with assertions to check if each is launched using only exisiting classes provided in android API.
It seems we can only test at activity level. But can we automate a flow : like spawning front and back between activities ?
I am new for Junit testing framework. Is it possible to test a flow
Share
Yes, through the use of Android instrumentation, which provides you with methods that put you into the drivers seat when interacting with activities as the system would through it’s instrumentation framework.
Basically, your able to trigger and manage every aspect of an activities life cycle, including introspecting results from activities calling each other. So if you’ve worked with the
ActivityTestCasethat’s suitable when testing a single activity, you can have a look at theInstrumentationTestCasethat provides you with a low-level approach to work with multiple activities at once.