Comprehensive Guide to Mobile App Performance Testing: Methods, Metrics, and Tools
This article presents a detailed overview of mobile app performance testing, covering the importance of performance metrics for video applications, the prioritized dimensions such as smoothness, crash, memory and power consumption, and practical methods and tools for acquiring Android and iOS system metrics.
Performance testing is often overlooked, especially in startups, yet mobile video applications demand rigorous testing of smoothness, download speed, and other performance indicators; this guide introduces common methods and product‑specific focuses for mobile performance testing.
For entertainment‑type video apps, the priority order of performance dimensions is smoothness (FPS), crash stability, memory usage, network traffic, response time, power consumption, and CPU usage.
Quantitative units for these dimensions include FPS for smoothness, megabytes for memory, and so on.
On Android, most metrics can be obtained via Linux‑based commands. Examples include retrieving CPU usage with
adbshell dumpsyscpuinfo | grep packagename > /address/cpu.txtor using the top command: adbshell top | grep packagename > /address/cpu.txt. Battery information can be fetched with adbshell dumpsys battery, and package details with adbshell dumpsys package. Network traffic can be measured using adbshell cat /proc/uid_stat/uid/tcp_rcv and adbshell cat /proc/uid_stat/uid/tcp_snd.
On iOS, performance data is collected using Xcode Instruments on a Mac; the latest Xcode version (e.g., 7.0) simplifies metric acquisition.
The article lists key performance metrics to capture: CPU, memory, power consumption, startup time, frame rate, GPU behavior, and network traffic, each with detailed sub‑items such as idle, medium, and full‑spec memory usage, power‑consumption calculations, and startup‑time categories (first launch, non‑first launch, UI switch).
CPU testing methods include using Android‑provided APIs and the top command. Memory testing covers scenarios like idle state, medium and full specifications, peak usage, leaks, residency, and post‑stress conditions.
Power testing is divided into software approaches (third‑party tools like Kingsoft Battery Manager, custom tools using PowerManager.WakeLock, and calculations combining CPU, WakeLock, data transfer, GPS, and Wi‑Fi consumption) and hardware approaches (multimeter or power meter, sometimes requiring a dummy battery or soldering).
Startup time is measured for first launch, subsequent launches, and in‑app UI switches, using software methods (Android DisplayManager logs filtered by the "Displayed" keyword) or hardware timing.
Frame‑rate and GPU testing involve detecting overdraw, measuring FPS, and assessing frame variance. Overdraw can be inspected via developer options on Android (requires version 4.2+), with acceptance criteria such as no black pixels, limited 4× overdraw, and overdraw area not exceeding one‑quarter of the screen.
Screen‑scroll frame‑rate testing can be performed with software tools like Systrace (enabling Graphics and View tracing, capturing trace files, converting them to CSV) or with hardware assistance.
Network‑traffic testing defines load levels (medium and high) and includes items such as first‑launch traffic, background traffic over two hours, peak traffic under high load, and average traffic under medium load. Methods involve third‑party apps (e.g., Traffic Buddy) or custom solutions using packet capture ( tcodump) and parsing with Wireshark, as well as adb commands to read per‑UID traffic counters before and after app usage.
Recommended iOS performance tools are Instruments, Tencent’s GT SDK, and the open‑source SmallApple framework (https://github.com/hyxbiao/smallapple), which supports non‑jailbroken devices, does not require source code, works with App Store or third‑party apps, and provides a command‑line interface for automated testing, including CPU, memory, traffic, crash detection, and reporting.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
