Is there a runtime check for an application to find out if it runs as part of an instrumentation test?
Background: Our application performs a database sync when star
This work for me because no actual device is running
public static boolean isUnitTest() { return Build.BRAND.startsWith(Build.UNKNOWN) && Build.DEVICE.startsWith(Build.UNKNOWN) && Build.DEVICE.startsWith(Build.UNKNOWN) && Build.PRODUCT.startsWith(Build.UNKNOWN); }