What Are APKs? The Impact of Android APKs on Dev & Testing
After a very long history behind the Android market, and the recent Android 11 GA, Google is enforcing a new method of application development and delivery process. Up until quite recently, each Android application binary would have been built, signed, and deployed in a format of .APK to Google Play.
As of today, Google already supports the new Android applications under the type and format of APKs. This new change also ties in with the rise of progressive web apps (PWAs) that Google initiated a while ago to also improve the end user experience, and reduce app size and network/environment dependencies.
What Are APKs?
APKs are typically zip files that consist of multiple, single APK files. Based on rules, specific devices, and user requests, these files will get installed and enabled on the devices in production.
How Do You Build an APK File?
To actually build an APK file, developers need to create an AAB file which stands for Android App Bundle. This AAB is a publishing format that Google requires developers to create, and inside a single file, developers will deploy all of the app content from code, media resources, translated strings resources, and other app-related files.
Once the developer has completed building the AAB file, they can use the bundle tool to generate the APKs. Once uploaded to Google Play, Google can sign and deploy to the respecteddevices and end users.
Benefits of APKs
Here are the main reasons Google is making these significant changes to the app development process:
- Application binary sizes.
- Overall resource consumption like CPU, battery, and network by unused features of the app.
- The ability to gradually expose as well as enable/disable specific modules and features based on customers countries, requirements, and other considerations.
This new method serves not only the end users, who enjoy a lighter application to download onto their devices. It also serves R&D and engineering teams so they can build and gradually expose new features to end users dynamically and based on context. With some of the new and supported APIs, developers can push immediate and flexible application updates to their users.
What Do Android App Bundles and APKs Mean to Developers and Testers?
Now that you know the benefits of APKs and Google’s requirements for making this transition, here are few considerations and implications of this new type of technology.
As mentioned above, the new method of Android application development and deployment is changing with the introduction of app bundles. This impacts the end-to-end process of build, test, and deploy.
Developers and testers need better communication to fully understand:
- The release scope and what’s supported in the build to be tested.
- Which devices were added to the supported list.
- Which features and modules are added or deprecated.
- And much more.
Without formal processes and communication, there will be huge sync issues resulting in escaped defects, broken builds, late testing, and more.
As the image above dictates, the size of the app (Swiggy in this case), the version of the app, and the Android OS version varies based on the end user location and device/OS family.
Continuous testing, test automation, and other types of testing are critical to digital businesses. These testing methods are always critical and will not change in importance with this new technology. The new technology, however, will require much more rigorous processes and testing strategies to accommodate the variance in the different APK files that are supported and part of the AAB bundle.
Since Android users will start consuming smaller, fresher, and more dynamic app versions, the testing matrix — which was a monolithic application testing approach up until recently — will need to shift toward a split-module approach.
Developers and testers need to have a solid matrix of generic app features and different features that are enabled on-demand, based on geolocation and language, and pushed from developers to production and others.
On one hand, users might report issues like the above Google Play review on the Swiggy app, but on the other hand, R&D can easily review this claim, and either push an immediate update, or trigger a flexible update to ensure that the issue is resolved.
As mentioned in the above example provided by Google, new types of dynamic feature module delivery options must be communicated to the testing team. This ensures that they can build manual and automated testing scenarios on the relevant device/OS families, with and without these flags, in time for the app launch on Google Play.
Lastly, since developers are no longer signing Android apps prior to deploying to Google Play, it is critical to ensure that the end-to-end signing process per each APK within the bundle works fine using the APKSigner tool and other guidelines from Google, prior to the upload.
Google will sign the APK file individually once a user downloads them to his/her device, so this needs to work per APK file. It is recommended that both developers and testers review and learn more on this new technology ahead of next year’s mandatory enforcement by Google. There is a useful checklist for launching app bundles, that can be a great start.
Innovation and technology are key for digital transformation, and Google in many cases is leading the market with great enhancements.
In this specific case, this innovative approach is not an option, but a mandate for app developers to shift to in the very near future. It is imperative that the app development teams and testing practitioners start exploring APKs, and AABs, and understand how to shift their processes, methods, and plans to support this new technology sooner rather than later.
Try Testing Android Apps With Perfecto
Testing in the cloud has never been easier or more scalable. Perfecto enables testing teams to execute at scale against devices in the cloud. And developers can work straight from their IDE of choice to debug apps.
With Perfecto, you get:
- Mobile and web testing in the cloud.
- Enterprise-grade security.
- Extended test coverage.
- Elastic scaling of tests.
- Robust, built-in test reporting and analytics.
Give it a try with a free, two-week trial.