Testing App Bundles

With the introduction of Android App Bundles at Google i/o 2018, Android developers are now able to upload the Android app as a so called bundle to the Google Play Console. Based on the app bundle, the Google Play Console is now in charge to optimize, compile and sign an APK file for each specific mobile device configuration. With this new mechanism not all resources like images or text translations are part of the APK which leads to smaller APK sizes. Besides that, developers don’t have to compile APK files to specific Android versions or devices. Furthermore, developers are able to add dynamic features into the App Bundle. This dynamic features can be excluded from the initial download for the users to minimize the download time and size on the phone. Once the dynamic feature is needed, the app is downloading it as an extension to the app. This is called dynamic delivery.

To get the full picture about Android App Bundles and how it works, please read this article.

Testing App Bundles

But let’s get back to the testing part for App Bundles. The good thing is, that the “old” way of testing an APK file is still valid. But if the app is going to support App Bundles, there are a couple of new challenges mobile tester need to handle. Mobile testers need to test, that the App Bundles are delivered to the specific device configuration e.g. screen size, Android OS version or the used device language. Depending on the app complexity and the customer device usage, this will increase the amount of test scenarios significantly.

Google offers a new tool called bundletool to support the testing activities on the local machine. It will generate APKs from the App Bundles.

Using the command

bundletool build-apks --bundle=/APPUnderTest/test_app.aab --output=/APPUnderTest/test_app.apks

will compile a container with the ending *.apks which includes all the apk configurations your app supports. After the APKs have been compiled you can install them with the command

bundletool install-apks --apks=/APPUnderTest/test_app.apks

for the specific connected device.

Testing App Bundles Via the Play Console

Once the different APK configurations have been tested locally, a mobile tester must perform the same tests via the Google Play Console, to see if the Play Store delivers the right APK configuration to the different devices. Google introduced the internal test track to support the testing activities for App Bundles. Once the internal test track is setup with the test accounts, a mobile tester can use the Play Store app installed on the phone to check, that the right app configuration is installed on the device.

Last but not least, mobile tester must perform the app update testing with App Bundles, too.