http://www.developer.com/http://www.developer.com/ws/android/development-tools/android-app-performance-testing-an-end-to-end-approach.html
Android application performance tests need to follow an end-to-end application delivery model that tests for all the varying scenarios on each component involved. That way, android app developers can gain a true understanding of how their Android apps will perform on a given device as the end users would perceive them. In a recent DevX article, we proposed such an end-to-end approach for mobile application performance testing. In this article we validate that approach for Android developers by will walking through an Android application performance test using a sample banking app. The Android app performance test involves the following components and tools. The sample Android app is a hybrid application for processing banking transactions. Hybrid mobile applications are installed on mobile devices just like native mobile apps but users can access them via either an installed app or the device browser. The aim is to test this application for performance and find different performance viewpoints. The server component (see details below) handles the business logic for the banking transactions initiated from either a mobile thick/thin client or a desktop Web browser. A network emulator recreates a wide variety of network conditions such as latency, jitter, packet loss/error/reordering, and bandwidth restrictions, so that developers can simulate environments such as Wide Area Networks (WANs), Wireless LANs, GPRS, 3G, 2G, IP over Radio / Radio over IP (RoIP), Satellite or MPLS networks. The network emulator determines the traffic load generated by the application under different network conditions. We used Infosys WindTunnel, an in-house tool developed by Infosys Labs, for this performance test. A load generator tool generates load on the application under test, and it will measure the load times. It allows configuration changes to ramp up the load, increase concurrent users, increase transactions per second, enable parameterization of the URLs, and name each URL. We used JMeter to recreate the load from different delivery modes for the sample application. We used both a high-end and a low-end device for testing to because performance can vary and we wanted to prove the importance of variability in device configurations on the same platform. Perfmon is a performance monitoring tool that is mapped with windows. The required performance counters are configured before running the test. After you start the configured data collector set, it automatically collects the results data during the scenario run. The Android Debug Bridge ( DDMS is an Android debugging tool that provides port-forwarding services, screen capture on the device, thread and heap information on the device, logcat, process, and radio state information, incoming call and SMS spoofing, location data spoofing, and more. DDMS is integrated into Eclipse and is also shipped in the To set up representative Android app performance testing scenarios, follow the instructions for each of the following settings. During your actual performance tests, be sure to recreate all the scenarios applicable to the test application's context. Here are the steps for actually executing the Android app performance test. These steps were repeated to cover all the test scenarios mentioned earlier. The following data was captured on the device using Here are a few sample results that can be obtained by testing. Note that these results are only the tip of the iceberg of what you can do with end-to-end performance testing. The graph below is the device result which is monitored by the The graph below shows the difference between thick client and thin client. This allows us to understand how the rendering of responses affects performance from the end user's point of view. The graph below presents the network speed for 3G and 2G networks. Load is generated via the load runner tool. We observed that the 2G response time rose higher than that of the 3G as we increased the load. As you can see, extensive analysis can be performed with the end-to-end data available for the different components involved in mobile application delivery. Such analysis would not be possible if the device were tested in isolation with no control over server/network conditions. This article presented a proof of concept for end-to-end mobile application performance testing using a sample Android app. It detailed every component to be tested, the method for testing as well as the challenges involved. When adopting this approach, be sure your Android application performance tests are under these conditions:
Android App Performance Testing: An End-to-end Approach
June 1, 2012
Android App Performance Test Components
Android Application
Server Component
Network Emulator
Load Generator
Android Device
Performance Monitor
Android Debug Bridge
adb), a tool that comes with the Android SDK, allows us to control and interface with our Android device. We used various adb commands to monitor the sample hybrid Android app.
adb shell top — Returns the CPU info for all the Process IDs (PID)adb shell dumpsys meminfo <PID> — Returns the memory info for the particular Process IDadb shell procrank — Returns the PSS, RSS, VSS and USS for all the process IDs (PID)adb shell cat /proc/cpuinfo — Returns the processor information of the emulatoradb shell cat /proc/meminfo — Returns the memory Info for all the process IDs (PID)adb logcat — Returns the log messages, including GCDalvik Debug Monitor Server
tools/ directory of the SDK. To launch the tool, follow these instructions.
ddms (or ./ddms on Mac/Linux) from the tools/ directory.
Workload Type
apk file in the emulator. Record the necessary flows using JMeter.Workload Mix
Network types
Airtel is an Indian telecom operator. Note that the speed emulated for the profiles do not represent the actual values, but they should during actual tests.Device types
Android App Performance Test Execution
apk) is:
Once installed, the transaction was carried out on the real device with server and network conditions emulated. In addition, the transaction was also carried out on the on-device browser.adb install <apk>
adb.
Server Emulator Device
CPU %
Memory Info
Processor Info
Network Info
Response Time
Android App Performance Test Results
Device Performance
adb commands. We observed no huge difference in PSS, memory allocated, heap size or used memory with the increase in load.
Click here for larger image
Figure 3. Device Performance ResultsThick and Thin Client Performance Comparison
Click here for larger image
Figure 4. Thick and Thin Client Performance ResultsNetwork Performance Comparison
Click here for larger image
Figure 5. Comparison of Network Performance ResultsConclusion