For any mobile app, performance is very critical. If your Mobile App does not perform well, the end user will uninstall your app find another application that performs better.

Your Mobile application needs to be tested thoroughly before releasing it to end user.

In this tutorial, you will learn-

Mobile Application Testing Strategy

Application performance on a mobile phone or any smart device is usually measured in following three categories.

  • Device Performance
  • Server/API Performance
  • Network Performance

Device Performance

When the client experiences slow app, they get annoyed.

For device performance, you will check following -

  • App Start Up

    How much time your app takes to start up? It is the first performance parameter adjudged by the user. As a thumb rule, after the user taps on app icon the first screen should be shown in 1-2 seconds.

  • Battery Time while using an app

    On constant use, some mobile apps, consume a high amount of battery life and heat the phone. This factor adds a lot to the performance of any mobile app and could normally happen when your app is using more resources than required. Excessive resource usage creates a burden on the processor and phone gets heat up.

  • Memory Consumption

    When Testing an app, the memory consumption by an app should be checked. By implementing certain functionalities in the app, the memory consumption also increases. For example, in Android apps when push notifications are implemented then memory consumption increases.

    In some cases, it has been observed that memory usage by whole O.S is mere 14%, but a new app is consuming 11%. So, these factors must be handled before deploying the app to the real world or giving to the client.

  • Hardware/Software Variation

    When testing a mobile app, it is mandatory to check apps on different devices. It could be the case that app is running smooth on one device but not on other. Like for different vendors of Android devices, we can check the app on Samsung, HTC, and Lenovo phones. Similarly, the app needs to be tested with different RAM and processor specifications like 1 GB or 2 GB.

  • Usage with Other Apps

    When the app under test is running in parallel with other apps, there should be no interference. The best way to check it is by switching app under testing and other apps.

  • App in background

    An app that is running in the background is retrieved, it should remain in the same state as it was before. If this scenario is not handled properly, then data get lost. Again you have to enter data from scratch upon retrieving the app.

Server/API Performance

When the app is interacting with the server via API, the response time becomes critical to performance. For Server performance, you will check -

  • Data to and from server

    The app should handle data efficiently that is sent from the server. It must not take too much time while loading data. In certain apps, data is sent in a specified format. So before displaying it in the app, it should be converted to a relevant format. In this process, apps sometimes become slower and response time becomes longer.

  • API Calls Generated from App

    The number of calls from App under test to the server generated from app should be less. In some cases, multiple API calls are made for the same functionality. For better performance, this should be handled with less number of calls.

  • Server Down Time

    Due to any reason if the server is down or unreachable we can save data in the native database. So, whenever the server is down, we can show data stored in the native database. Another solution could be the failover database servers i.e. if one of the servers is down or in maintenance phase the backup server should be available to switch over. The failover/backup server should be in continuous replication and synchronization with the main server.

Network Performance

The performance of the app on different networks and network properties need to be measured.

For Network performance, you will check following things.

  • Jitters

    When there is a delay in receiving information on the network, then it is termed as jitters. It is a problem with the connectionless networks or packet switch networks. As the information is distributed into packets, packets can travel by a dissimilar path from the sender to the receiver. When data arrives at the intended location, it becomes scrambled than it was originally sent. In the case of Jitters, the mobile app should be capable enough to handle it.

    You need to Show the appropriate notifications to the end user, either to resend the request or wait till the system responds again.

  • Packet Loss

    In the case of complete packet loss, the app should be able to resend the request for the information or should generate the alerts accordingly. If data is not complete, then the user will not be able to comprehend information displayed in App. This can be stressful for the user. So, it is better to display a suitable message or prompt user to try again.

  • Network Speed

    The app needs to be checked on a variety of networks with variable speed. The app should be tested on 2.5G, 3G, and 4G networks. Both Wi-Fi and mobile networks are included in this. Also, the behavior of app should be monitored. Especially, when both networks are available, and switching occurred from one network to another.

    For example, an issue may arise in an app for the users while switching phone network from 4G to WIFI and vice versa. In this case, the app becomes unresponsive and may require restarting the app for use.

Troubleshooting Mobile Applications Performance

After discovering the issues/problems while Performance Testing. It is time to trace and correct faults.

Problem 1) Lag or sluggish response of the Mobile App.

The cause of this delay may be the RAM, Cache, etc.

You need to kill unnecessary processes or clear the cache. Troubleshooting the connectivity issue may solve some of the problems that are creating lags

Problem 2) App Restarting, locking up, freezing or unresponsiveness.

It may be fixed by some of the following steps

  • Optimizing the application codes
  • Software should be patched and updated.
  • Automatic restores
  • Managing RAM or in some cases ROM while using external cards
  • Wiping the cache partitioning
  • Verifying the app working with other third party apps and API's
  • Mapping the mobile application according to device

Useful Mobile App Testing Tools

Mobile app testing tools vary according to the devices or mobile OS. Some common mobile app Performance Testing tools are

ANDROID

  • Robotium

    It is just like Selenium for Mobile Apps. The tester can record and play several steps that are required to perform testing.

  • Monkey Runner

    MonkeyRunner can run tests on real devices connected to a PC or emulators. The tool has an API, which allows controlling a smartphone, a tablet or an emulator from outside of Android code.

APPLE

  • Automator (Mac)

    Automator is an application developed by Apple for OS X. It implements point-and-click (or drag and drop) creation of workflows for automating repetitive tasks into batches for quicker alteration. This saves time and effort over human intervention to manually change each file separately.

Challenges

Key challenges faced while Performance Testing include

  • Organizing different mobile platforms and their operating systems
  • Simulating Connectivities like Edge, 3G, 4G or WiFi, etc.
  • Mobile devices constraints like battery and resources consumption
  • Mobile phone usability
  • The assorted sizes of mobile devices to run the same app

Set up Mobile App Performance Test Environment

To configure Test Environment, you need to-

  • Understanding of the mobile app which needs to be tested
  • Identification of different OS on which the app needs to run
  • Building the test setup
    • Build the emulators or simulators
    • Prototyping of the actual setup
  • Selecting the appropriate tool for the testing

Mobile App Performance Testing Checklist

Testing the performance of the mobile apps is an important measure before release. Performance Testing is done to check

  • How much of the RAM is required for utilizing this app?
  • To verify speed and response time of APP under different networks and circumstances.
  • Ensure realistic user experience under several network conditions
  • Ensure the required results are achieved in case of multiple connectivities
  • Ensure the application do not get crashed.
  • Ensuring the mobile applications perform well while using data, Wi-Fi or other connectivity
  • Monitoring the uptime and the mobile API usage bottlenecks
  • To ensure the maximum number of simultaneous users
  • Finally, to check the mobile app to its limits

Summary

  • Performance testing requires an understanding of Mobile App, resource utilizer, virtual users, emulators and multiple test strategies.
  • App performance on a mobile phone is measured in following three categories.
    • Device Performance
    • Server Performance
    • Network Performance
  • Performance testing challenges include compact sizes of the mobile devices, resources availability, costing, and budgeting.

This article is contributed by Nosheen Wajahat

 

YOU MIGHT LIKE: