A Short Guide to Beta Testing Android Apps, Using Google Play
So, you’ve finished the initial development of your new Android Application, resolved all of the obvious bugs, and now you are ready to get it out there for additional testing. There are numerous ways this could be done, but if your ultimate goal is to publish your app in the Google Play Store it is a natural choice to use the Play Store itself for Beta testing.
Setting Up Your Google Play Account
If you haven’t already done so, it is necessary to sign up for a Google Developer Account to publish to Google Play. Basically, all you need to do is sign in to the account that you want to associate with the Play Store, pay the registration fee, and enter some additional information. And if everything goes as planned, you will now have access to your very own developer console. Alternatively, if there is already an existing Google Play account that will be used for publishing your app, the administrator of this account can grant you access to their developer console. Either way, once everything is set up, the you will be able to access the developer console.
Uploading Your App
The next step is to create the signed application package from your development environment. I’ll be using Eclipse, but this should be possible in any Android development environment or from the command line. In Eclipse, under the Android Tools menu, select “Export Signed Application Package”.
You will then see a popup which asks you to select a project to export. Select your project and continue.
The next section asks you to create a keystore for your app. This is the first time exporting the signed application, so you will select “Create new keystore”, and then choose a location and a password. It is VERY IMPORTANT to keep the keystore somewhere safe and to remember the password since you will need to use the same keystore and key each time the app is exported.
The next section is for the key creation. Again, it is VERY IMPORTANT to remember the password for this and to enter the information correctly when the key is created. In order to get your app into Google Play, the key must expire after a certain date. If you select the recommended length of 25 years, you shouldn’t have any problems.
All you need to do for the next step is select the destination for the signed application package. This is the file you will be uploading to the Play Store.
For more information on application signing see https://developer.android.com/tools/publishing/app-signing.html.
Uploading the APK
Now that you have your signed APK, you can go to your developer console and upload it to the store by clicking “Add new application”.
When you see this popup, enter a title for you application and click “Upload APK”.
At this point you should be taken to a screen that looks something like this. Depending on what stage of development your application is in, you can select Production, Beta, or Alpha. Since the goal is to get the application into the Play Store for Beta testing, you will select the BETA TESTING tab, and then click the “Upload your first APK to Beta”.
Here, click “Browse files” and find your signed APK file, and then click “Save”.
If everything went as planned you will see your upload as well as some additional controls and options.
Managing your Testers
The easiest way to manage your group of testers is to set up a Google+ Community that will have access to your application for testing. Setting up a community is easy enough, and once you have done so you will need the community URL. For this application I created a public community which can be found here https://plus.google.com/communities/102979675820139489176, so I will click on “Manage list of testers” and add this community.
Publishing your Application
Once your application is published, anyone in this community will have access to your application and will be able to participate in Beta testing. However, even though the application will not be in the Play Store for the entire Android community to download just yet, you will still need to add some information about your application before continuing. The list of information that still needs to be entered can be found by clicking on “Draft” and then “Why can’t I publish?”
Here is the list with no information entered.
Once that is completed, you will see an option to publish your application.
Once your application is published, you will see a message which says that it will take a few hours before the application will show up in Google Play. Once it does show up you will be able to find it at an address which looks something like this https://play.google.com/apps/testing/com.tallan.helloworld.
Testing your Application
After navigating to your testing URL, https://play.google.com/apps/testing/[YOUR APP NAME HERE], you will see a screen that looks like this. This is the same screen that people in your testing community will see (as long as they are logged in to Google at the time). Here there are links to become a tester and to download the application from the Play Store.
If you click “Become a Tester” you’ll see this.
After waiting several hours you will be able to click on “Download from the Play Store” and you will see your app listed in the play store available for download.
After clicking “Install”, you will see a list of your devices. Choose a device from the list and the application will be downloaded automatically.
Uploading a New Version
At some point you will have to upload a new version of your app to the Play Store. To do this you will need to go back and create a new APK for the new version of your application. In this sample, the new version of “Hello World!” will have its very own “SELF DESTRUCT” button, which will instantly cause the application to crash.
Once your changes are made, you will need to open the manifest file and take a look at the Version Code and the Version Name. The Version Code value is an integer that you will increment by one each time a new version is created. Version Name can be just about anything and can even remain the same between versions.
From here the process is similar to when we first created the APK, but this time we will be using an existing keystore and key. When you get here, all you need to do is enter the password and click next.
Note: If something goes wrong and you get this after clicking next, don’t panic! I won’t go into detail on this, but if the keystore has become corrupted or you forgot the password, there are utilities out there that will crack your keystore password for you or help to recover a corrupted keystore. I have found this one to be particularly useful https://code.google.com/p/android-keystore-password-recover/.
Assuming the password was correct and the keystore was not tampered with, you should see this. Again, enter the password and click next.
And if you entered the correct password, you should see this again.
If the export succeeds, you are ready to upload the file again to the Play Store. With the new APK created you can go back to the developer console and find the APK menu. This time you will be clicking on “Upload new APK to Beta”, and then uploading your new APK file.
Once uploaded, you should see something that looks like this with the version from your manifest file. All you need to do now is click “Publish now to Beta” and the new version will be uploaded.
After a few hours, the new version of your application will be in the play store, and just as with any other app, anyone who currently has the app installed on their device will be able to update to the latest version.
Viewing Crash Reports
Here we come to what is probably the greatest advantage of testing your application with the Play Store. Whenever someone running the Beta version encounters an error which causes the application to crash, they will have the option to either report the crash or just continue. The testers for your application should always select the option to report the crash, since no information will be displayed on the console if they don’t. This information can be found in the “Crashes and ANRs” section of the developer console. When users report a crash you will be able to see the stack trace at the time the error was caused, as well as any messages the user entered when reporting the crash.