Android Testing  By Dhirendra Jha                     © 2011 GlobalLogic Inc.
Agenda1. Introduction2. Feature & Framework3. Various Releases4. Android SDK5. Configuration6. Emulator7. Application inst...
INTRODUCTION  Android is a mobile phone operating system developed by  Google. Android is unique because Google is activel...
Contd..• Based on Linux with a Java programming interface. It  provides tools, e.g. a compiler, debugger and a device  emu...
Features• Key Features   – Application framework enabling reuse and replacement of     components   – Dalvik virtual machi...
Contd..          © 2011 GlobalLogic Inc. 6
Architecture               © 2011 GlobalLogic Inc. 7
Android Architecture - Application• Android provides a set of core applications:    –   Email Client    –   SMS Program   ...
Android Architecture– App Framework• Enabling and simplifying the reuse of components   – Developers have full access to t...
Android Architecture - Libraries• Including a set of C/C++ libraries used by components of  the Android system• Exposed to...
Android Architecture - Runtime• Core Libraries   – Providing most of the functionality available in the core libraries of ...
Android Architecture – Runtime (Cont)• Dalvik Virtual Machine   – Providing environment on which every Android application...
Android Architecture – Linux Kernel   Relying on Linux Kernel 2.6 for core system services     •   Memory and Process Man...
Contd..• Android comes with an Android market which is an online  software store. It was developed by Google. It allows  A...
Available VersionPlatform      Codename              API VersionAndroid 1.5   Cupcake               3Android 1.6   Donut  ...
Android SDK• Download appropriate file for your system from  http://developer.android.com/sdk/index.html• Extract to desir...
Contd..• Select the package you want to install and complete the  installation.                                           ...
Folder View of Android SDK                             © 2011 GlobalLogic Inc. 18
Application Installation On Device• Installing Applications through Android Market   – Open the Android Market application...
Contd..• Installing Applications With Android SDK   – Need to modify Android’s settings to allow the installation of     a...
Application Un-installation from Device• Uninstalling Android Applications   – Sometimes an application just needs to go. ...
Create Android Emulator• Double click on “android.bat”. Shows below screen• Click on the New button.                      ...
Contd..• Provide all the details.• Click on Create AVD button.                                © 2011 GlobalLogic Inc. 23
Contd..• Select the newly created AVD and click on Start.                                                     © 2011 Globa...
Contd..          © 2011 GlobalLogic Inc. 25
Other Tools• adb.exe –  – Android Debug Bridge is a versatile tool that lets you manage the state of    an emulator instan...
Contd..          © 2011 GlobalLogic Inc. 27
• android.bat - This is an important development tool that  lets you:  • Create, delete, and view Android Virtual Devices ...
Contd..• ddmss.bat   •   Dalvik Debug Monitor Server (DDMS) is a debugging tool which provides port-       forwarding serv...
Contd..• Functionalities available using this utility                                                 © 2011 GlobalLogic I...
Contd..• Capture the screen shot or copy the file from/to device.                                                    © 201...
Contd..• emulator.exe  – The Android SDK includes a mobile device emulator — a    virtual mobile device that runs on your ...
Development Environment• ADT plugin for Eclipse   – Android Development Tools (ADT) is a plugin for the Eclipse IDE that  ...
Device Root• Root stands for administrator access which you can have  access to delete, modify, create new files inside th...
Contd..• This means you can overcome limitations that the carriers  and manufacturers put on your phone, extend system  fu...
Android OS SpecificationsAndroid 1. 0 Was released on 23 September 2008. The first Android device, theHTC Dream (G1), Do...
Cont.Android 1. 5 (cupcake)   Was released on 30 April 2009 based on Linux Kernel 2.6.27.   Support third party virtual ...
Cont..Android 2.0/2.1 (Eclair)   Was released on 26 October 2009 based on Linux Kernel 2.6.29.   Can add multiple accoun...
Cont…Android 2.3 (Gingerbread)   Was released on 6 December 2010 based on Linux Kernel 2.6.35.   Updated user interface ...
Cont….Android 3.0 Honeycomb   Was released on 22 February 2011 based on Linux Kernel 2.6.36.   First android OS Tablet s...
Installation/upgrade                                                                         Need to focus on Installation...
Unique challenges in Testing1   Diversity of Device Environment                        Exhaustive         Interfaces  ...
Success Factors              1         Use of Test Automation                              Automating appropriate areas ...
Android testing Tools and UtilityTest the Android application for    Low Memory condition :    Fill Device Memory Lite    ...
Fill Device Memory LiteGeneral Overview of the Tool1. “Fill Device Memory Lite” tool fill the android device internal (RAM...
Fill Device Memory LiteStep 1: Select the Device storage memory•   Select “Internal Storage” for filling device RAM    mem...
Android testing Tools and Utility Capture the device log withoutConnecting the device to system:         Log Collector    ...
Log CollectorGeneral Overview of the Tool  Collects a device log and sends it to a developer using a method (email, messag...
Test Automation Overview                © 2011 GlobalLogic Inc. 49
Q&A      © 2011 GlobalLogic Inc. 50
Upcoming SlideShare
Loading in...5
×

Gl android platform

1,180

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,180
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
105
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Gl android platform

  1. 1. Android Testing By Dhirendra Jha © 2011 GlobalLogic Inc.
  2. 2. Agenda1. Introduction2. Feature & Framework3. Various Releases4. Android SDK5. Configuration6. Emulator7. Application installation8. Tools used9. Devices Root10. Q & A © 2011 GlobalLogic Inc. 2
  3. 3. INTRODUCTION Android is a mobile phone operating system developed by Google. Android is unique because Google is actively developing the platform but giving it away for free to hardware manufacturers and phone carriers who want to use Android on their devices. © 2011 GlobalLogic Inc. 3
  4. 4. Contd..• Based on Linux with a Java programming interface. It provides tools, e.g. a compiler, debugger and a device emulator as well as its own Java Virtual machine (Dalvik Virtual Machine - DVM).• It was initially developed by Android Inc., a firm later purchased by Google, and lately by the Open Handset Alliance.• The unveiling of the Android distribution on 5 November 2007 was announced with the founding of the Open Handset Alliance © 2011 GlobalLogic Inc. 4
  5. 5. Features• Key Features – Application framework enabling reuse and replacement of components – Dalvik virtual machine optimized for mobile devices – Integrated browser based on the open source WebKit engine – SQLite for structured data storage – Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) – GSM Telephony (hardware dependent) – Bluetooth, EDGE, 3G, and WiFi (hardware dependent) – Camera, GPS, compass, and accelerometer (hardware dependent) © 2011 GlobalLogic Inc. 5
  6. 6. Contd.. © 2011 GlobalLogic Inc. 6
  7. 7. Architecture © 2011 GlobalLogic Inc. 7
  8. 8. Android Architecture - Application• Android provides a set of core applications: – Email Client – SMS Program – Calendar – Maps – Browser – Contacts – Etc• All applications are written using the Java language. © 2011 GlobalLogic Inc. 8
  9. 9. Android Architecture– App Framework• Enabling and simplifying the reuse of components – Developers have full access to the same framework APIs used by the core applications. – Users are allowed to replace components. © 2011 GlobalLogic Inc. 9
  10. 10. Android Architecture - Libraries• Including a set of C/C++ libraries used by components of the Android system• Exposed to developers through the Android application framework © 2011 GlobalLogic Inc. 10
  11. 11. Android Architecture - Runtime• Core Libraries – Providing most of the functionality available in the core libraries of the Java language – APIs • Data Structures • Utilities • File Access • Network Access • Graphics • Etc © 2011 GlobalLogic Inc. 11
  12. 12. Android Architecture – Runtime (Cont)• Dalvik Virtual Machine – Providing environment on which every Android application runs • Each Android application runs in its own process, with its own instance of the Dalvik VM. • Dalvik has been written such that a device can run multiple VMs efficiently. – Executing the Dalvik Executable (.dex) format • .dex format is optimized for minimal memory footprint. • Compilation © 2011 GlobalLogic Inc. 12
  13. 13. Android Architecture – Linux Kernel Relying on Linux Kernel 2.6 for core system services • Memory and Process Management • Network Stack • Driver Model • Security Providing an abstraction layer between the H/W and the rest of the components © 2011 GlobalLogic Inc. 13 13
  14. 14. Contd..• Android comes with an Android market which is an online software store. It was developed by Google. It allows Android users to select, and download applications developed by third party developers and use them.• Android applications are written in java programming language. Android is available as open source for developers to develop applications which can be further used for selling in android market.• Android relies on Linux version 2.6 for core system services such as security, memory management, process management, network stack, and driver model.• For software development, Android provides Android SDK (Software development kit). © 2011 GlobalLogic Inc. 14
  15. 15. Available VersionPlatform Codename API VersionAndroid 1.5 Cupcake 3Android 1.6 Donut 4Android 2.1 Éclair 7Android 2.2 Froyo 8Android 2.3 Gingerbread 9, 10Android 3.0 Honeycomb 11, 12, 13Android 4.0 Ice Creame Sandwich © 2011 GlobalLogic Inc. 15
  16. 16. Android SDK• Download appropriate file for your system from http://developer.android.com/sdk/index.html• Extract to desired location• Run “SDK Manager.exe” (or the equivalent for your system) © 2011 GlobalLogic Inc. 16
  17. 17. Contd..• Select the package you want to install and complete the installation. © 2011 GlobalLogic Inc. 17
  18. 18. Folder View of Android SDK © 2011 GlobalLogic Inc. 18
  19. 19. Application Installation On Device• Installing Applications through Android Market – Open the Android Market application given in the Applications menu. – Choose any option- Applications, Games or Search or My Downloads based on what you want to do. – Now you can click on the application you want and you will get more details of the desired application. – If you want to install it, just click on the Install button on the bottom of the screen. – In the next screen, it will give you more details about the application including the different functionalities it will need to access. – Just click on OK to finish installing the application. © 2011 GlobalLogic Inc. 19
  20. 20. Contd..• Installing Applications With Android SDK – Need to modify Android’s settings to allow the installation of applications from other sources. Under “Settings,” select “Application Settings” and then enable “Unknown Sources.” Also under “Settings,” select “SD Card” and “Phone Storage,” and finally enable “Disable Use for USB Storage” – This last step is easy. Open Command Prompt and type the following: adb install applicationxxx.apk – Application install successfully and shows under the device application screen. © 2011 GlobalLogic Inc. 20
  21. 21. Application Un-installation from Device• Uninstalling Android Applications – Sometimes an application just needs to go. Whether a better one has been found or an application has simply worn out its welcome, it must be uninstalled. Uninstalling is as simple as it was to install it. – Open the Google Android Menu. – Go to the Settings icon and select Applications. – Next, click on Manage. – A list of installed applications will appear. – Select the one to be uninstalled and simply click Uninstall. – With that, the application is uninstalled. © 2011 GlobalLogic Inc. 21
  22. 22. Create Android Emulator• Double click on “android.bat”. Shows below screen• Click on the New button. © 2011 GlobalLogic Inc. 22
  23. 23. Contd..• Provide all the details.• Click on Create AVD button. © 2011 GlobalLogic Inc. 23
  24. 24. Contd..• Select the newly created AVD and click on Start. © 2011 GlobalLogic Inc. 24
  25. 25. Contd.. © 2011 GlobalLogic Inc. 25
  26. 26. Other Tools• adb.exe – – Android Debug Bridge is a versatile tool that lets you manage the state of an emulator instance or Android-powered device. You can also use it to install an Android application (.apk) file on a device. – ADB allows you to interact with your phones file system through a terminal based interface like command prompt. Since android is based on the Linux platform, ADB can be used to perform advanced operations using a command prompt window. © 2011 GlobalLogic Inc. 26
  27. 27. Contd.. © 2011 GlobalLogic Inc. 27
  28. 28. • android.bat - This is an important development tool that lets you: • Create, delete, and view Android Virtual Devices (AVDs). • Create and update Android projects. • Update your Android SDK with new platforms, add-ons, and documentation. © 2011 GlobalLogic Inc. 28
  29. 29. Contd..• ddmss.bat • Dalvik Debug Monitor Server (DDMS) is a debugging tool which provides port- forwarding services, screen capture on the device, thread and heap information on the device, logcat, process, and more. © 2011 GlobalLogic Inc. 29
  30. 30. Contd..• Functionalities available using this utility © 2011 GlobalLogic Inc. 30
  31. 31. Contd..• Capture the screen shot or copy the file from/to device. © 2011 GlobalLogic Inc. 31
  32. 32. Contd..• emulator.exe – The Android SDK includes a mobile device emulator — a virtual mobile device that runs on your computer. The emulator lets you develop and test Android applications without using a physical device. – When the emulator is running, you can interact with the emulated mobile device just as you would an actual mobile device, except that you use your mouse pointer to "touch" the touch screen and can use some keyboard keys to invoke certain keys on the device. Ex - emulator -avd <avd_name> [-<option> ] © 2011 GlobalLogic Inc. 32
  33. 33. Development Environment• ADT plugin for Eclipse – Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications. – ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add components based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) .apk files in order to distribute your application. – See the detail about configuration using the URL - http://developer.android.com/sdk/eclipse-adt.html#installing © 2011 GlobalLogic Inc. 33
  34. 34. Device Root• Root stands for administrator access which you can have access to delete, modify, create new files inside the android operating system, in short, gaining root access on your android devices is like granting yourself an administrator level which you can do all things you want unlike user level, you don’t have the right to delete unworthy applications and files that can consume a lot of space inside the internal memory of the device.• Getting root or rooting your phone is the process of modifying the operating system on your device which will grant you complete control over it. © 2011 GlobalLogic Inc. 34
  35. 35. Contd..• This means you can overcome limitations that the carriers and manufacturers put on your phone, extend system functionality, and even upgrade it to a custom flavor of Android.• The name root equally known as Administrator on Windows is called root.• Getting rooted on the device will give you eternal freedom to use the capabilities of your android device. But doing this will might break your device and might void your warranty, so if I you are afraid to have freedom on your device, I recommend to do this once your device is out of warranty. © 2011 GlobalLogic Inc. 35
  36. 36. Android OS SpecificationsAndroid 1. 0 Was released on 23 September 2008. The first Android device, theHTC Dream (G1), Download and upgrade support from Market. WiFi and Bluetooth support. Google Sync support. Maps with street view support Voice dialer without typing Name. Static Wallpaper SupportAndroid 1. 1 Was released on 9 February 2009. Support Map view with business details Support Saving the attachment from MMS © 2011 GlobalLogic Inc. 36
  37. 37. Cont.Android 1. 5 (cupcake) Was released on 30 April 2009 based on Linux Kernel 2.6.27. Support third party virtual keyboard with text prediction. Support widget Supports video Recording Copy Paste feature Shows user picture & thumbs for Favorites Animated screen transitions Android 1. 6 (Donut) Was released on 15 September 2009 based on Linux Kernel2.6.29. Voice and text entry search Multi-lingual speech synthesis engine Updated technology support for CDMA/EVDO, 802.1x, VPNs,and a text-to-speech engine © 2011 GlobalLogic Inc. 37
  38. 38. Cont..Android 2.0/2.1 (Eclair) Was released on 26 October 2009 based on Linux Kernel 2.6.29. Can add multiple account and performed sync. Exchange Email supports Ability to search saved SMS or MMS Improve Google Maps Addition of Live wallpaper 2.1 SDK was released on 12 January 2010Android 2.2 (Froyo) Was released on 20 May 2010based on Linux Kernel 2.6.32. Speed, memory and performance optimization Support for the Android Cloud to Device Messaging (C2DM) service,enabling push notifications USB tethering and Wi-Fi hotspot functionality Support for installing applications to the expandable memory © 2011 GlobalLogic Inc. 38
  39. 39. Cont…Android 2.3 (Gingerbread) Was released on 6 December 2010 based on Linux Kernel 2.6.35. Updated user interface design with increased simplicity and speed Native support for SIP VoIP internet telephony Support for Near Field Communication (NFC) Supports for multiple Camera , Front Camera Support, OS 2.3.4 supports voice & Video chat using Gtalk. OS 2.3.7 introduced Google Wallet support for the Nexus S 4GAndroid 4.0 (Ice Cream Sandwich) Was released on 20 May 2010based on Linux Kernel 2.6.32. Speed, memory and performance optimization Support for the Android Cloud to Device Messaging (C2DM) service, enabling pushnotifications Separation of widgets in a new tab, listed in a similar manner to apps Ability to access apps directly from lock screen Unlock, a feature that allows users to unlock handsets using facial recognition software Supports Google+ , hangout feature © 2011 GlobalLogic Inc. 39
  40. 40. Cont….Android 3.0 Honeycomb Was released on 22 February 2011 based on Linux Kernel 2.6.36. First android OS Tablet support for Motorola Xoom . Multi-tasking Supports Multiple browser tap Supports Video Chat by Gtalk. Supports for Multi-Core processors. New two-pane Email UI Resizable home screen widget Supports Joysticks and gamepads. Improved Adobe Flash supports in browser. Added System Bar, featuring quick access to notifications, status, and softnavigation buttons, available at the bottom of the screen. Ability to view albums and other collections in full-screen mode inGallery, with easy access to thumbnails for other photos © 2011 GlobalLogic Inc. 40
  41. 41. Installation/upgrade Need to focus on Installation / Un-installation /upgrade of app 3rd Party Functional Developers Installation/upgrade Testing Testing of all features and functions of a system to ensure requirements and specifications are metVendor/Operator Functional UI Applications Compatibility Testing conducted on the mobile applications to evaluate the applications compatibility with Capability Testing OS, Software / Hardware Enterprise Platforms etc Applications Implementation Widget Testing Widget Stress Adding / Deleting of widget. Prototype Application as widget Proprietary Performance Testing Applications Performance Testing Process of determining the performance of the application in case of low memory, Battery Consumption. Long Run. Automated Testing Handset Phone Interrupt Manufacturers Application behavior in case of voice call, SMS and Network interrupt © 2011 GlobalLogic Inc. 41
  42. 42. Unique challenges in Testing1 Diversity of Device Environment    Exhaustive Interfaces Rendering Compatibility testing of of images with User and positioning of elements in screen mobile 2  Hardware Configuration  Less memory & processing power runtimes for computing  Application compatibility with WAP enabled & HTTP enabled devices4  Rapid Application Development (RAD)   Benefits include faster time market Reduced Development time to 3  Network related challenges   Network Latency Gateways as Data Optimizers  Reduced Testing cycle time © 2011 GlobalLogic Inc. 42
  43. 43. Success Factors 1  Use of Test Automation  Automating appropriate areas 2  Use of Emulators and actual devices  Emulators are useful for unit testing5 Usability    Application should download quickly Horizontal and Vertical Navigation should be easy Images used should be clear 3  Testing for wide mobile environments  Font of Texts should be legible  Color scheme used  GUI & Compatibility tests4  Measuring application complexity  Enterprise applications subjected to Performance Testing, Security Testing & Synchronization Testing © 2011 GlobalLogic Inc. 43
  44. 44. Android testing Tools and UtilityTest the Android application for Low Memory condition : Fill Device Memory Lite © 2011 GlobalLogic Inc. 44
  45. 45. Fill Device Memory LiteGeneral Overview of the Tool1. “Fill Device Memory Lite” tool fill the android device internal (RAM) and External Memory/SD Card in automated method.2. No Need to manually copy the temp files or application into device to fill the memory.3. All created files (plain text) are stored under application designated folders and will not mess up your internal or external storages. How to use tool 1. Download the “Fill Device Memory Lite” tool from android Market. 2. Run the application from your testing android device. © 2011 GlobalLogic Inc. 45
  46. 46. Fill Device Memory LiteStep 1: Select the Device storage memory• Select “Internal Storage” for filling device RAM memory or “External Storage” for filling device SD CardStep II : Check the Space available• Check the space available in android device.• Delete the file in chunk on 8MB ( only available in Full Version)• Delete all previously created temp files at once from device.Step 3: Select the file size• 11 Preset file size to select the size to select form.• User can able to create single file size of 2GB.• My Size option detect the available free size present in memory and create the single file of detected free memory size. ( Available in full Version)Step 4: Fill the device memory for selected filesize.• Fill the android device with selected file size. © 2011 GlobalLogic Inc. 46
  47. 47. Android testing Tools and Utility Capture the device log withoutConnecting the device to system: Log Collector © 2011 GlobalLogic Inc. 47
  48. 48. Log CollectorGeneral Overview of the Tool Collects a device log and sends it to a developer using a method (email, messaging, etc.) of your choice. The log data is vital to troubleshoot a crashing, or otherwise misbehaving application. How to use tool 1. Download the “Log Collector” tool from android Market. 2. Run the application from your testing android device. © 2011 GlobalLogic Inc. 48
  49. 49. Test Automation Overview © 2011 GlobalLogic Inc. 49
  50. 50. Q&A © 2011 GlobalLogic Inc. 50
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×