Question: I am being asked by my QA team to give them different APKs pointing to different servers and they can install all of them on the same device so that they can compare it side by side. 

I know it's impossible to have multiple APKs on the device without changing the package name. But then since the app uses services like GCM, they depend on package name and then we have to start doing changes on server to support debug builds. 

I'm just generally curious to know how people around usually test the app, specially in the case above where you can have multiple servers that you may want to test on. Are there any specialised tools that you guys use? What's the best practice?

Answer: 
Have a debug-only screen where they can select the server to connect to...
**My team has 3 servers:** 

1. Live server
2. Smoke server
3. Staging server

All three has the same code but different database and API. So When I release APK for testing I just change the **applicationId** in my `build.gradle`

**Example:**

For live server:

```
android {
compileSdkVersion 'Google Inc.:Glass Development Kit Preview:19'
buildToolsVersion "22.0.1"

defaultConfig {
    applicationId "com.company.glass.doc" //CHANGE APP-ID FROM HERE
    minSdkVersion 19
    targetSdkVersion 19
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}}

```

For smoke and staging server:

```
android {
compileSdkVersion 'Google Inc.:Glass Development Kit Preview:19'
buildToolsVersion "22.0.1"

defaultConfig {
    applicationId "com.company.glass.docinternal" //CHANGE APP-ID FROM HERE
    minSdkVersion 19
    targetSdkVersion 19
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}}

```

The respective server detects the appropriate APK using applicationId.