SlideShare a Scribd company logo
Android Testing


  By Dhirendra Jha




                     © 2011 GlobalLogic Inc.
Agenda
1. Introduction
2. Feature & Framework
3. Various Releases
4. Android SDK
5. Configuration
6. Emulator
7. Application installation
8. Tools used
9. Devices Root
10. Q & A

                              © 2011 GlobalLogic Inc. 2
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
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
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
Contd..




          © 2011 GlobalLogic Inc. 6
Architecture




               © 2011 GlobalLogic Inc. 7
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
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
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
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
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
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
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
Available Version
Platform      Codename              API Version

Android 1.5   Cupcake               3

Android 1.6   Donut                 4

Android 2.1   Éclair                7

Android 2.2   Froyo                 8

Android 2.3   Gingerbread           9, 10


Android 3.0   Honeycomb             11, 12, 13

Android 4.0   Ice Creame Sandwich



                                                  © 2011 GlobalLogic Inc. 15
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
Contd..
• Select the package you want to install and complete the
  installation.




                                                            © 2011 GlobalLogic Inc. 17
Folder View of Android SDK




                             © 2011 GlobalLogic Inc. 18
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
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
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
Create Android Emulator
• Double click on “android.bat”. Shows below screen




• Click on the New button.
                                                      © 2011 GlobalLogic Inc. 22
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 GlobalLogic Inc. 24
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 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
Contd..




          © 2011 GlobalLogic Inc. 27
• 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
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
Contd..
• Functionalities available using this utility




                                                 © 2011 GlobalLogic Inc. 30
Contd..
• Capture the screen shot or copy the file from/to device.




                                                    © 2011 GlobalLogic Inc. 31
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
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
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
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
Android OS Specifications
Android 1. 0
 Was released on 23 September 2008. The first Android device, the
HTC 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 Support

Android 1. 1
 Was released on 9 February 2009.
 Support Map view with business details
 Support Saving the attachment from MMS



                                                                      © 2011 GlobalLogic Inc. 36
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 Kernel
2.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
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 2010

Android 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
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 4G
Android 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 push
notifications
 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
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 soft
navigation buttons, available at the bottom of the screen.
 Ability to view albums and other collections in full-screen mode in
Gallery, with easy access to thumbnails for other photos
                                                                       © 2011 GlobalLogic Inc. 40
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 met
Vendor/Operator
                                               Functional         UI
  Applications                                                                     Compatibility
                                                                         Testing conducted on the mobile
                                                                           applications to evaluate the
                                                                          application's 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
Unique challenges in Testing


1
   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
                                                                     devices




4       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
Success Factors


              1         Use of Test Automation
                              Automating appropriate areas


                                                              2
                                                                 Use of Emulators and actual
                                                                  devices
                                                                      Emulators are useful for unit
                                                                       testing




5
       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 tests




4      Measuring application complexity
             Enterprise applications subjected
              to Performance Testing, Security
              Testing & Synchronization Testing



                                                                                           © 2011 GlobalLogic Inc. 43
Android testing Tools and Utility

Test the Android application for
    Low Memory condition :

    Fill Device Memory Lite




                                        © 2011 GlobalLogic Inc. 44
Fill Device Memory Lite
General Overview of the Tool
1. “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
Fill Device Memory Lite
Step 1: Select the Device storage memory
•   Select “Internal Storage” for filling device RAM
    memory or “External Storage” for filling device SD
    Card

Step 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 file
size.
•   Fill the android device with selected file size.
                                                                           © 2011 GlobalLogic Inc. 46
Android testing Tools and Utility

 Capture the device log without
Connecting the device to system:

         Log Collector




                                        © 2011 GlobalLogic Inc. 47
Log Collector
General 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
Test Automation Overview




                © 2011 GlobalLogic Inc. 49
Q&A


      © 2011 GlobalLogic Inc. 50

More Related Content

PPSX
ANDROID
PDF
Slides bootcamp21
DOCX
Android architecture
PPTX
Basics of Android
PDF
Android and its feature
PDF
Android Development Workshop
PPTX
Android Application Development
DOC
document
ANDROID
Slides bootcamp21
Android architecture
Basics of Android
Android and its feature
Android Development Workshop
Android Application Development
document

What's hot (20)

ODP
Architecture your android_application
PPTX
Intel XDK - Philly JS
PDF
Android fundamentals and tutorial for beginners
PDF
Introduction to android
PPT
Introduction to android sessions new
PPTX
Introduction to Andriod
PDF
Android By Vipin
PPT
android-tutorial-for-beginner
PDF
Android : Architecture & Components
PPTX
Android OS and application development
PPTX
Android Basic
PPTX
Android
PPTX
Basic of Android App Development
PDF
First Steps with Android - An Exciting Introduction
PPTX
Build HTML5 VR Apps using Intel® XDK
PDF
Ch1 hello, android
DOCX
Android
PPT
Android Architecture
PPT
Android architecture and Additional Components
PPT
Android development tutorial
Architecture your android_application
Intel XDK - Philly JS
Android fundamentals and tutorial for beginners
Introduction to android
Introduction to android sessions new
Introduction to Andriod
Android By Vipin
android-tutorial-for-beginner
Android : Architecture & Components
Android OS and application development
Android Basic
Android
Basic of Android App Development
First Steps with Android - An Exciting Introduction
Build HTML5 VR Apps using Intel® XDK
Ch1 hello, android
Android
Android Architecture
Android architecture and Additional Components
Android development tutorial
Ad

Similar to Gl android platform (20)

PPTX
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...
PDF
Android
PPTX
Developing for Android-Types of Android Application
PDF
Android Programming
PPT
Android
PPTX
Mobile Application Development powerpoint
PDF
Introduction to android
PPT
Android 130923124440-phpapp01
PDF
Android Seminar BY Suleman Khan.pdf
PPT
PPT
Android Applications
PPT
PPTX
Android
PPTX
1319571 634635606205391250
PPT
Android Application Development Using Java
PPT
Introduction to Android.ppt
PPTX
Basics of Android and Android development environment
PDF
Android report.
PPTX
Android Technology
 
PPTX
Seminar on android app development
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...
Android
Developing for Android-Types of Android Application
Android Programming
Android
Mobile Application Development powerpoint
Introduction to android
Android 130923124440-phpapp01
Android Seminar BY Suleman Khan.pdf
Android Applications
Android
1319571 634635606205391250
Android Application Development Using Java
Introduction to Android.ppt
Basics of Android and Android development environment
Android report.
Android Technology
 
Seminar on android app development
Ad

More from Pragya Rastogi (20)

DOCX
Qtp questions
PPT
Qtp not just for gui anymore
PDF
Qtp tutorial
PDF
Qtp4 bpt
DOCX
Get ro property outputting value
PDF
Bp ttutorial
PPTX
Gl istqb testing fundamentals
PPTX
Gl scrum testing_models
DOCX
My Sql concepts
PDF
Java programming basics
PDF
70433 Dumps DB
PDF
DOC
70562-Dumps
PDF
70562 (1)
ZIP
PDF
DOCX
Mobile testingartifacts
PPTX
GL_Web application testing using selenium
PPT
Gl qtp day 3 1
Qtp questions
Qtp not just for gui anymore
Qtp tutorial
Qtp4 bpt
Get ro property outputting value
Bp ttutorial
Gl istqb testing fundamentals
Gl scrum testing_models
My Sql concepts
Java programming basics
70433 Dumps DB
70562-Dumps
70562 (1)
Mobile testingartifacts
GL_Web application testing using selenium
Gl qtp day 3 1

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Cloud computing and distributed systems.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Encapsulation theory and applications.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
NewMind AI Weekly Chronicles - August'25 Week I
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Unlocking AI with Model Context Protocol (MCP)
Cloud computing and distributed systems.
Chapter 3 Spatial Domain Image Processing.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Encapsulation theory and applications.pdf
Review of recent advances in non-invasive hemoglobin estimation
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Machine learning based COVID-19 study performance prediction
Per capita expenditure prediction using model stacking based on satellite ima...
Understanding_Digital_Forensics_Presentation.pptx
20250228 LYD VKU AI Blended-Learning.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
NewMind AI Monthly Chronicles - July 2025
NewMind AI Weekly Chronicles - August'25 Week I

Gl android platform

  • 1. Android Testing By Dhirendra Jha © 2011 GlobalLogic Inc.
  • 2. Agenda 1. Introduction 2. Feature & Framework 3. Various Releases 4. Android SDK 5. Configuration 6. Emulator 7. Application installation 8. Tools used 9. Devices Root 10. Q & A © 2011 GlobalLogic Inc. 2
  • 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. 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. 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. Contd.. © 2011 GlobalLogic Inc. 6
  • 7. Architecture © 2011 GlobalLogic Inc. 7
  • 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. 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. 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. 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. 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. 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. 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. Available Version Platform Codename API Version Android 1.5 Cupcake 3 Android 1.6 Donut 4 Android 2.1 Éclair 7 Android 2.2 Froyo 8 Android 2.3 Gingerbread 9, 10 Android 3.0 Honeycomb 11, 12, 13 Android 4.0 Ice Creame Sandwich © 2011 GlobalLogic Inc. 15
  • 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. Contd.. • Select the package you want to install and complete the installation. © 2011 GlobalLogic Inc. 17
  • 18. Folder View of Android SDK © 2011 GlobalLogic Inc. 18
  • 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. 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. 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. Create Android Emulator • Double click on “android.bat”. Shows below screen • Click on the New button. © 2011 GlobalLogic Inc. 22
  • 23. Contd.. • Provide all the details. • Click on Create AVD button. © 2011 GlobalLogic Inc. 23
  • 24. Contd.. • Select the newly created AVD and click on Start. © 2011 GlobalLogic Inc. 24
  • 25. Contd.. © 2011 GlobalLogic Inc. 25
  • 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. Contd.. © 2011 GlobalLogic Inc. 27
  • 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. 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. Contd.. • Functionalities available using this utility © 2011 GlobalLogic Inc. 30
  • 31. Contd.. • Capture the screen shot or copy the file from/to device. © 2011 GlobalLogic Inc. 31
  • 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. 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. 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. 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. Android OS Specifications Android 1. 0  Was released on 23 September 2008. The first Android device, the HTC 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 Support Android 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. 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 Kernel 2.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. 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 2010 Android 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. 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 4G Android 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 push notifications  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. 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 soft navigation buttons, available at the bottom of the screen.  Ability to view albums and other collections in full-screen mode in Gallery, with easy access to thumbnails for other photos © 2011 GlobalLogic Inc. 40
  • 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 met Vendor/Operator Functional UI Applications Compatibility Testing conducted on the mobile applications to evaluate the application's 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. Unique challenges in Testing 1  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 devices 4  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. Success Factors 1  Use of Test Automation  Automating appropriate areas 2  Use of Emulators and actual devices  Emulators are useful for unit testing 5  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 tests 4  Measuring application complexity  Enterprise applications subjected to Performance Testing, Security Testing & Synchronization Testing © 2011 GlobalLogic Inc. 43
  • 44. Android testing Tools and Utility Test the Android application for Low Memory condition : Fill Device Memory Lite © 2011 GlobalLogic Inc. 44
  • 45. Fill Device Memory Lite General Overview of the Tool 1. “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. Fill Device Memory Lite Step 1: Select the Device storage memory • Select “Internal Storage” for filling device RAM memory or “External Storage” for filling device SD Card Step 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 file size. • Fill the android device with selected file size. © 2011 GlobalLogic Inc. 46
  • 47. Android testing Tools and Utility Capture the device log without Connecting the device to system: Log Collector © 2011 GlobalLogic Inc. 47
  • 48. Log Collector General 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. Test Automation Overview © 2011 GlobalLogic Inc. 49
  • 50. Q&A © 2011 GlobalLogic Inc. 50