I am a newbie to the Android testing world and the samples for Unit tests mention the use of AndroidJunit4
runner. I have stumbled upon another runner called AndroidJUnitRunner
. Now, I saw the docs for both the classes and at one glance, it seems that the difference is that AndroidJunit4
supports JUnit4 especially while AndroidJUnitRunner
supports JUnit3 and JUnit4 but if you look into the class structure and the available methods, there actually is a huge difference between these two runners.
For ex, AndroidJUnitRunner
extends from the following classes:
And, AndroidJunit4
extends from,
So, what is the difference between the two runners and which runner am I supposed to be using finally?