Use of mobile applications is rapidly expanding, present everywhere and staying ahead of the competition requires development, testing and release/updates of mobile apps in shorter time
Amid those shorter time windows, however, the performance aspect of the applications sometimes gets overlooked. Performance testing is crucial in the mobile app development
process to achieve better user experience in terms of speed, scalability and stability. With so many apps in the market providing similar functionality, app performance has become a critical
factor in choosing one particular app over others.
Performance testing of mobile applications is not as simple as conventional web application performance testing due to following challenges:
• Setting up test labs with different mobile platforms and operating systems
• Simulation of different networks is tedioustime-consuming
• Simulation of switching between networks
• Simulation of different signal strengths/bandwidths
• Mobile device constraints such as battery and resource consumption
• Field testing
Typically, mobile performance testing is carried out in seven phases:
Phase 1 - Discovery: In this phase, lots of information and historical data are collected with respect to business goals, application architecture, technology, user foot prints, etc. Special
consideration should be given to network parameters such as network type (2G, 3G, 4G Wi-Fi etc.) and signal strength. This information helps when formulating the non-functional requirement document.
Phase 2 - Planning: To execute performance testing effectively, a detailed performance test plan is necessary to smooth execution and analysis activities. It should include all activities to be
performed, including schedules, prerequisites, acceptance and entry/exit criteria. Tool selection is another key activity that is performed by taking into consideration pros and cons of different
type of tools (open source vs commercial). Choices include open source software like Jmeter or licensed software like LoadRunner or NeoLoad.
Jmeter can easily record mobile web browser-based application, but it lacks the flexibility to simulate different signal strengths or network virtualization (latency or packet loss). Ajax calls
also can’t be recorded in Jmeter, and there is no provision to check client-side performance tasks such as browser rendering.
In contrast, commercial tools like NeoLoad or LoadRunner can create tests that accurately represent real user conditions such as network conditions, specific devices and geographic
locations. Commercial tools can record any mobile application (native, hybrid or mobile browser app) and can simulate load on real devices. However, the high cost of commercial solutions can be a deterrent to many small- and mid-size organizations.
Phase 3 - Design and Development: This is where building scripts and setting up environments begins. This phase includes:
• Building the performance script according to requirements
• Designing the workload model to simulate the real life application usage
Phase 4 - Execution: First, scenarios need to be built according to the workload model described in Phase 3. Extra care should be given to network and mobile simulations. Then, tests
need to be performed in the following order:
1. Baseline test – Baseline testing checks how the application is behaving with the existing infrastructure and with varying loads.
2. Peak load test/Load test – Peak load testing uncovers any abnormalities that could arise when the system is put under load/peak load.
3. Stress test – Stress testing determines the breaking point of the system. The system load is gradually increased until it breaks.
4. Endurance test – Endurance testing puts the system under load (preferably 50%-80% of peak load) for a long duration. This is done to uncover memory leakage or database locks.
Phases 5-7 - Analysis, Reporting and Tuning: In these phases, results of every execution run is analyzed and documented in a meaningful report that includes graphs, observations,
conclusion and recommendations. These reports are shared with all stakeholders, and decisions are made about how to continue with the performance engineering efforts. This determines:
• Whether performance acceptance criteria have been met
• Whether test is conclusive
• If further tuning is required
Mobile apps will soon outpace web applications, so it is crucial that mobile apps are not only functional but also deliver a great experience in terms of performance. Both open source and commercial tools can be utilized for performance testing depending on project goals, requirements and budgetary considerations.