Mobile Saturday. Тема 3. Особенности тестирования приложения...

40
(Human Interface Guideline, Tools) Android Mobile Application Testing Smirnova Iuliia QC Engineer at SoftServe

Transcript of Mobile Saturday. Тема 3. Особенности тестирования приложения...

Page 1: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

(Human Interface Guideline, Tools)

Android Mobile Application Testing

Smirnova Iuliia

QC Engineer at

SoftServe

Page 2: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Who am I

Smirnova Iuliia

QC Engineer,

- Android manual and automation

- iOS manual

Page 3: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Agenda

1. Mobile technologies

2. Application types

3. User Guides

4. Tools

Page 4: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Mobile Technologies

Page 5: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Global mobile statistics 2014

• There are nearly 7 billion mobile subscriptions worldwide. This is equivalent to 95.5 percent of the world population

• Sales of smartphones worldwide topped 1.2 billion in 2014, up 28% from 2013

Source: The International Telecommunication Union (May 2014)

Page 6: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

The Future of Mobile Testing

Page 7: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Why is it challenging?

•Device Fragmentation

•Data Consumption

•Processing Power and Battery Life

•GPS, Biometric Scanners, Gyroscopes, Accelerometers

•Touchscreen UX and GUI

Page 8: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Mobile platforms

Page 9: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Evolution of Android

Page 10: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Application types

Page 11: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Applications

•Applications are the top layer in the Android architecture and this is where our application are going to fit

•Several standard applications come pre-installed with every device, such as:

1. SMS client app

2. Web browser

3. Contact manager

Page 12: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)
Page 13: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Native apps

•Downloadable

•Native APIs.

•Performance

Examples:

Facebook (from 2013)

LinkedIn (from 2013)

Evernote (from 2015)

Page 14: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Hybryd apps

•Cross platform

•Web view limitations

•Downloadable

Examples

Basecamp

Page 15: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Web apps

•Cross platform

•No need to download

Page 16: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

User guide

Page 17: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Design principles

Page 18: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Common App UI

1. Action Bar2. Navigation Drawer3. Content Area

Page 19: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Action bar

1. App icon

2. View control

3. Action buttons

4. Action overflow

Contextual Action bar

Page 20: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Gestures

Users don’t click, they use gestures

•Tap/Double Tap

•Drag

•Flick/Swipe

•Zoom/Pinch

•Long Tap

Users expect all these gestures to work the same regardless of the app they are currently running

Page 21: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Tools

Page 22: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Device. Enable developers mode

• Settings > General > About phone• Software information > Build number

Rapidly tap on 'Build Number' five times and you will see the message 'You are now a developer!'

Page 23: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Developers options

•USB debugging

•Stay awake

•Show touches

•Pointer location

•Don't keep activities

•Background process limit

•Show all ANRs

•Allow mock locations

•Desktop backup password

•Take bug report

•Process stats

•Revoke USB debugging authorizations

•Show surface updates

•Show layout bounds

•Force RTL layout direction

Page 24: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

USB debugging

Page 25: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)
Page 26: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Workstation. Android SDK

http://developer.android.com

Page 27: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Android Debug Bridge (ADB)

Is a command line tool that lets you communicate with an emulator and device.

Includes three components:

▪ The ClientIt is what runs on your development machine

▪ The ServerIt is held responsible for communication between the client and daemon running on a device/emulator

▪ The DaemonIt runs as a background process on each device/emulator instance

<sdk>/platform-tools/

Page 28: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

ADB Commands

ADB Debugging

adb devices adb kill-server

Package manager

adb install adb uninstall adb shell pm list packages

File manager

adb pull adb push adb shell [ls/cd..]

Page 29: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

$ adb logcat

Page 30: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

$ android avd

1. From the main screen, click Create Virtual Device

Page 31: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

2. In the Select Hardware window, select a device configuration, such as Nexus 6, then click Next.

Page 32: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

3. Select the desired system version for the AVD and click Next.

4. Verify the configuration settings, then click Finish.

To launch the AVD in the Android Emulator, click the launch button in the list of AVDs.

Page 33: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Android Device Monitor

Tool with a graphical user interface for several Android application debugging and analysis tools.

From the command line, in the SDK tools/ directory, enter the following command:

$ monitor

Page 34: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)
Page 35: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Hierarchy viewer

Page 36: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Inspecting layouts

Page 37: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Take screenshot

Page 38: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Video record

1. Android 4.4 and higher:

adb shell screenrecord

•File under /sdcard/movie.mp4.

•Limit is 180 seconds (3 minutes)

2. Lower Android versions:

Using apps from GooglePlay (root required)

Page 39: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Network troubleshooting

• Burp Suite

• TCP Catcher

Page 40: Mobile Saturday. Тема 3. Особенности тестирования приложения на Android: Human Interface Guideline, Tools. (Юлия Смирнова)

Location

• Fake GPS location from PlayMarket

• Android Device Monitor