Disable Google Android Instrumentation Test Tracking
Google has started to track Android developers that run instrumentation tests sending all sorts of data about you and your device to Google Analytics. The opt-out solution they give is to add these options to the adb command: adb shell am instrument -e disableAnalytics true However, this is not how I typically run my tests. A more convinient and permanent solution is to add the following to your build.gradle file. android { … defaultConfig { … testInstrumentationRunnerArguments disableAnalytics: ‘true’ }} That’s it. Now the opt-out should work. I could not find the code of androidx.test.internal.runner.tracker.AnalyticsBasedUsageTracker online, but in case you … Continue reading