I am trying to write UI tests using Espresso for an APK but I don't have the source code. I am trying to init the ActivityTestRule using classpath.
I followed this article
private static final String CLASSNAME = "com.mytaxi.android_demo.activities.AuthenticationActivity";
private static Class<? extends Activity> activityClass = (Class<? extends Activity>) Class.forName(CLASSNAME);
@Rule
public ActivityTestRule<?> mActivityRule = newActivityTestRule(CLASSNAME);
but I caught this exception "java.lang.RuntimeException: No activities found"
Chances are, this APK is proguard protected. So the classes/packages names are currently obfuscated. In another words, the names are currently different.
Try using Monkey Runner instead
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With