Running into the issue when I have my android app installed via sim or device, I will run my automation tests with ‘./gradlew connectedCheck’ and the test package will overwrite the current app installation; then it deletes the instance of the app after the tests are completed.
I want to change the test package name so it does NOT overwrite the current version of the application. Is there a way to do this will Gradle?
I thought that testing application should have a different package name in its manifest (usually package name of tested app + “.test” suffix). That way the application and its test application can be installed on the device at the same time. And this is what I see when I do ‘gradle assembleTestDebug’ in the generated AndroidManifest.xml for a simple project.
I simply took one of the samples (basic) attached to the bottom of http://tools.android.com/tech-docs/new-build-system page. If you do not need to set anything special in this manifest you can rely on android build system to generate one for you and that’s what I did. Probably there is an example with an AndroidManifest.xml for testing application as well.