8 Tools For Mobile App Performance Testing
However, if the expectation of a flawless experience is not met, e.g., the app crashes or a payment failure occurs, we can expect almost half of the customers to abandon the purchase. We make sure this won't happen in the apps we work on. Here's eight tools we recommend for mobile applicaitons performance testing.
M-commerce is shopping through a mobile device rather than through a computer. It is forecasted to almost double its market share of total retail sales in the U.S. between 2020 and 2025. We observe a similar trend in other regions of the world, where mobile shopping already has a share of over 50% of total online purchases.
Yet, taking the example of the U.K., only 19% of their retailers consider mobile apps as their main commerce channel, often not prioritizing their performance which leads to poor user experience and loss of money.
Testing the performance of mobile apps is a critical step in ensuring a great user experience and high quality of the product. There are many tools available to help with this process, but not all of them are equally effective. In this blog post, we will explore eight of the mobile app performance testing tools we use on a daily basis.
How can I test my app's mobile performance?
Tackling mobile app performance testing is a whole different story than web performance tests. For web performance, we approached the topic from two sides, dividing the tools into those dedicated to frontend and backend testing. As for mobile app testing processes, we have three pillars of performance to consider:
-
Device performance
-
Network performance
-
Backend performance
While backend performance can often be tested using the tools described in the article linked above, device and network performance testing needs to be done with a different set of tools.
Avoiding performance problems is done with the use of profiling, i.e., tracking whether our app is making good use of resources such as CPU, memory, battery, and network. As you can imagine, this is quite time-consuming, as there is a need to profile your app not only on different systems (iOS/Android) but also on different device models.
In mobile, performance is the absolute key. Users are quick to abandon apps that are slow or buggy, so it’s essential that developers take the time to test for potential performance issues before release. Luckily, there are a number of tools available that can help with mobile performance testing for Android apps. A streamlined testing process is crucial in ensuring the app functions well in the competitive digital landscape.
Profiling via developer tools
Basic GPU performance profiling might be performed on devices via developer tools with the use of the Profile GPU Rendering option (or Profile HWUI rendering, depending on the version of Android running on the device) under the Monitoring section.
As an output, you get a graph where each bar represents an application frame. The height of a frame represents the time necessary to render the frame on the screen, directly impacting the app's performance by highlighting how efficiently the GPU handles rendering tasks.
Android Profiler
While developer tools allow us to do some quick profiling, in the case of Android we usually take advantage of Android Profiler. It is a comprehensive set of tools provided by Android Studio, the top Android IDE. It offers a view of the shared timeline for CPU, memory, network, and battery usage. Automating aspects of mobile app testing, such as performance monitoring tasks, can be efficiently handled using tools like Android Profiler, enhancing the consistency of app performance across various devices.
With its pre-built APK profiler, we can also debug and profile the APK without having to build it using Android Studio, and with only debugging enabled. What is helpful is the possibility of recording sessions and switching between them – thanks to this feature, performance metrics can be compared between different scenarios and mobile devices
Also, each of the previously mentioned resources can also be profiled in detail with a specific tool.
Memory profiler
Conducting performance testing for mobile apps is essential, and memory profiling plays a crucial role in this process. Memory leaks can lead to app freezes or even app crashes, making it vital to monitor the utilization of available memory to ensure consistent app performance.
In addition to a high-level overview of memory allocation, Memory Profiler allows us to create heap dumps thanks to which we can pinpoint where memory leaks happen and cause issues with the app’s performance.
CPU Profiler
Optimized CP usage provides users with a faster and smoother experience. High CPU usage not only degrades mobile performance but also shortens a device’s battery life. Monitoring CPU usage metrics, which are among the key performance indicators during app performance testing, is crucial for evaluating the efficiency and effectiveness of an application.
CPU Profiler was helpful for our teams when they needed to analyze thread activity in real-time. This tool also gives the possibility to record a session where we can analyze: method traces, function traces, and also system traces.
Depending on what you want to inspect, two recording configurations are available:
-
System Trace – to check how our app interacts with system resources
-
Method and function traces – to inspect which methods or functions cause particularly resource-heavy tasks
Network Inspector (previously Network Profiler)
Knowing when and how your app receives and sends data will show you if the underlying code is due for some optimization.
This tool is used by our teams to analyze application transfer data. You can see data sent and received by the application in real-time in the form of a timeline.
Recently, the tool has been moved from Android Profiler to the App Inspection tool. The look and feel have been preserved while giving a lighter-weight experience.
Energy Profiler (battery profiling)
Usually, because we all have a large number of apps installed on our mobile phones, we want to optimize an app's impact on device battery usage. Energy Profiler estimates energy consumption for different resources on the device and identifies heavy tasks that cause excessive battery usage.
All is clearly presented on the chart by component. This tool monitors CPU, network radio, GPS sensor, and system events such as wake locks, alarms, jobs, and location requests.
LeakCanary
LeakCanary, a memory leak detection library, is used as standard practice in Netguru. With the ability to pinpoint the cause of each leak, occurrences of “Application Not Responding” freezes, and OutOfMemoryError, crashes are dramatically reduced.
Android GPU Inspector (AGI)
A tool to profile graphics on Android devices across a range of CPUs, it is especially important when developing games apps. It analyzes the impact the app has on the device’s resources and gives you insight into GPU, CPU, memory, battery, and GOU counters. This, in turn, lets you identify performance issues and areas to optimize. Additionally, AGI can be instrumental in load testing and stress testing to evaluate the app's graphics performance under various conditions, including simulating many users and analyzing performance across different geo-locations, as well as assessing the application's behavior under high load or stress conditions, similar to the capabilities of tools like LoadRunner for various types of performance testing.
Charles Proxy
Charles Proxy is a tool to intercept network traffic. In the context of performance, what we find useful is its ability to adjust the bandwidth and latency of the internet connection.
iOS also offers a number of different mobile application testing tools. Each tool has its own strengths and weaknesses, so it's important to choose the right one for your needs. Here are some of them.
Xcode Instruments
Instruments are part of the Xcode toolset, however, this app can be used independently from Xcode. It also allows for profiling watchOS, tvOS, and macOS apps.
After choosing a profiling template or just initiating profiling (from Xcode, Dock, or CLI), you create a trace document to organize and configure instruments.
It allows you to adjust the testing environment by starting, pausing, and stopping data profiling, adding instruments, and also displaying a graphical summary of the data, together with detailed information about the collected data and summary, depending on your needs.
As one would expect from a comprehensive profiling tool, with the use of instruments we can:
-
Perform profiling on both simulator and real devices
-
Track CPU core and thread usage with Time Profiler
-
Look for performance bottlenecks with the Counter profiling template
-
Track overall system activity over time (including CPU, memory, network, and disk use) with the Activity monitor template
-
Monitor the network connections of the app with the Connections instrument
-
Find memory problems
-
Find ways to optimize the app to achieve optimized power efficiency
All of these help us to identify bottlenecks and make our lives easier with the option to record and replay events when debugging. The tool is highly customizable and we can save instrument configurations as templates.
Network Link Conditioner
A tool also provided by Xcode. It can simulate various network conditions. It has some preset profiles (3G, High Latency DNS, Very Bad Network, and so on) and allows for creating custom ones. It is used on physical iOS devices (the device must be enabled for development).
There's also a multiplatform tool available for mobile application performance testing.
AppSpector is an inspection platform that allows users to debug mobile applications. It is a paid solution (pricing for teams starts from about €40 a month). The tool is particularly useful for debugging rather than optimization.
However, users can still see real-time database content, network requests/traffic, logs, and performance metrics.
Additional benefits it offers:
-
Easy debugging for both iOS and Android operating systems
-
User-friendly interface
-
The possibility to debug mobile apps remotely
Aim for the best mobile app performance
While mobile app performance testing may seem (and is!) a complex topic, and this article merely scratched its surface, we need to remember how important it is in the digital era. Let's not be daunted, it's really all about having a systematic approach – identifying requirements, choosing the right tools, monitoring metrics and benchmarking, etc.
At Netguru, we have a group of passionate QA engineers who feel particularly attracted to the mobile domain and will help you achieve the best results that satisfy even the strictest users of your mobile app.