If I:
- Create a brand-new Android Studio 3.5.1 project (Kotlin, API 21, "Empty Activity" template)
- Run the app from inside the IDE
- Confirm the app is installed and has a launcher icon
- Run the
connectedAndroidDebugTest
Gradle task (from inside Android Studio or viagradlew
)
The app winds up being uninstalled by the test run. I get that behavior even if I add a testApplicationId
value to defaultConfig
to have the test code use a different application ID.
How do I stop that behavior? How can I run instrumented tests from the command line, without disturbing an existing app installation?