gl android platform
DESCRIPTION
TRANSCRIPT
© 2011 GlobalLogic Inc.
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. 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. 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. 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. 6
Contd..
© 2011 GlobalLogic Inc. 7
Architecture
© 2011 GlobalLogic Inc. 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. 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. 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. 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. 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. 13
Android Architecture – Linux Kernel
13
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. 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. 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. 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. 17
Contd..
• Select the package you want to install and complete the installation.
© 2011 GlobalLogic Inc. 18
Folder View of Android SDK
© 2011 GlobalLogic Inc. 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. 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. 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. 22
Create Android Emulator
• Double click on “android.bat”. Shows below screen
• Click on the New button.
© 2011 GlobalLogic Inc. 23
Contd..
• Provide all the details. • Click on Create AVD button.
© 2011 GlobalLogic Inc. 24
Contd..
• Select the newly created AVD and click on Start.
© 2011 GlobalLogic Inc. 25
Contd..
© 2011 GlobalLogic Inc. 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. 27
Contd..
© 2011 GlobalLogic Inc. 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. 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. 30
Contd..
• Functionalities available using this utility
© 2011 GlobalLogic Inc. 31
Contd..
• Capture the screen shot or copy the file from/to device.
© 2011 GlobalLogic Inc. 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. 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. 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. 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. 36
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
Was released on 9 February 2009.
Support Map view with business details
Support Saving the attachment from MMS
Android 1. 1
Android OS Specifications
© 2011 GlobalLogic Inc. 37
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
Cont.
© 2011 GlobalLogic Inc. 38
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
Cont..
© 2011 GlobalLogic Inc. 39
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
Cont…
© 2011 GlobalLogic Inc. 40
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
Cont….
© 2011 GlobalLogic Inc. 41
Vendor/Operator Applications
Enterprise Applications
Proprietary Applications
Handset Manufacturers
3rd Party Developers
Installation/upgrade
Functional
Compatibility
Widget Testing
Performance Testing
Phone Interrupt
Need to focus on Installation / Un-installation /upgrade of app
Testing of all features and functions of a system to ensure requirements and specifications
are met
Adding / Deleting of widget. Application as widget
Process of determining the performance of the application in
case of low memory, Battery Consumption. Long Run.
Application behavior in case of voice call, SMS and Network
interrupt
Testing conducted on the mobile applications to evaluate the
application's compatibility with OS, Software / Hardware
Platforms etc Implementation
Prototype
Automated Testing
Installation/upgrade Testing
Functional UI
Capability Testing
Widget Stress
Performance Testing
© 2011 GlobalLogic Inc. 42
1 Diversity of Device Environment
Exhaustive testing of User
Interfaces
Rendering of images and
positioning of elements in screen
Compatibility with mobile
runtimes 2 Hardware Configuration
Less memory & processing power
for computing
Application compatibility with
WAP enabled & HTTP enabled
devices
3 Network related challenges
Network Latency
Gateways as Data Optimizers 4 Rapid Application Development (RAD)
Benefits include faster time to
market
Reduced Development time
Reduced Testing cycle time
Unique challenges in Testing
© 2011 GlobalLogic Inc. 43
1 Use of Test Automation
Automating appropriate areas 2 Use of Emulators and actual
devices
Emulators are useful for unit
testing
3 Testing for wide mobile
environments
GUI & Compatibility tests
4 Measuring application complexity
Enterprise applications subjected
to Performance Testing, Security
Testing & Synchronization Testing
Success Factors
Usability
Application should download
quickly
Horizontal and Vertical Navigation
should be easy
Images used should be clear
Font of Texts should be legible
Color scheme used
5
© 2011 GlobalLogic Inc. 44
Test the Android application for
Low Memory condition :
Fill Device Memory Lite
Android testing Tools and Utility
© 2011 GlobalLogic Inc. 45
Fill Device Memory Lite
How to use tool
1. Download the “Fill Device Memory Lite” tool
from android Market.
2. Run the application from your testing
android device.
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.
© 2011 GlobalLogic Inc. 46
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.
Fill Device Memory Lite
© 2011 GlobalLogic Inc. 47
Capture the device log without
Connecting the device to system:
Log Collector
Android testing Tools and Utility
© 2011 GlobalLogic Inc. 48
Log Collector
How to use tool
1. Download the “Log Collector” tool from
android Market.
2. Run the application from your testing
android device.
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.
© 2011 GlobalLogic Inc. 49
Test Automation Overview
© 2011 GlobalLogic Inc. 50
Q & A