0% found this document useful (0 votes)
18 views33 pages

Android App Testing Reserach and Practice

The document discusses mobile application testing and outlines some of the key challenges in testing Android applications. It notes that testing is important to establish confidence in software but that testing Android apps is challenging due to factors like rich user interactions, integration of sensors and devices, mobile constraints, and Android fragmentation. It provides examples of test scripts, event logging, and the use of keywords to design test cases without programming. The document also discusses challenges like device diversity and the need for cloud-based collaborative testing across multiple devices.

Uploaded by

cuongchu2506
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views33 pages

Android App Testing Reserach and Practice

The document discusses mobile application testing and outlines some of the key challenges in testing Android applications. It notes that testing is important to establish confidence in software but that testing Android apps is challenging due to factors like rich user interactions, integration of sensors and devices, mobile constraints, and Android fragmentation. It provides examples of test scripts, event logging, and the use of keywords to design test cases without programming. The document also discusses challenges like device diversity and the need for cloud-based collaborative testing across multiple devices.

Uploaded by

cuongchu2506
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Test Corner

Test Corner
Test Corner

Without talented testers, we are unable to truly


establish our confidence to software applications
Test Corner
Test Corner
Test Corner

• The rich user interactions

• The integration of multiple hardware sensors and devices

• The mobile environment constraints

• The Android fragmentation

• Security concerns (application, communication, resources, data, device


forensics)
Test Corner
Test Corner
Test Corner

• Need to re-capture the user interactions if the user interface is changed or API-
dependent, such as datepicker and timepicker
• Can record user and key events only
Test Corner

ViewRoot PhoneWindow$DectorView

View FrameLayout

LinearLayout

ViewGroup
Test Corner

User Event Corresponding Script Function


Click Button clickOnButton()
Click Check Button clickOnCheckBox()
Click Text clickOnText()
Click EditText clickOnEditText()
Click Menu clickOnMenuItem()
Click Radio Button clickOnRadioButton()
Click Tab clickOnTab()
Touch Screen clickOnScreen()
Press Phone Back Key goBack()
Press Phone Home Key goHome()
Test Corner

Example of Generated Test Script and


ACRT Screenshot

script editor

project
explorer JUnit view

the console window


Test Corner

user space Device nodes: /dev/input/eventX

Event Input event drivers 1. struct input_event {


handler drivers/input/evdev.c, tsdev.c… 2. struct timeval time;
3. __u16 type;
4. __u16 code;
5. __s32 value;
kernel space Input 6. };
drivers/input/input.c
core
time (sec.µs) device file type code value

Input Input device drivers such as


driver touch screen, mouse, keyboard

hardware space Input devices


Test Corner

time (sec.µs) device file type code value


Test Corner

高階事件 事件類型 播放類型 說明


Capture Replay Click 觸控手勢 高階操作 點擊
LongClick 觸控手勢 高階操作 長按
Swipe 觸控手勢 高階操作 滑動
Even Test Drag 觸控手勢 高階操作 拖曳
t Log Test runner Report
SingleFreeSwipe 觸控手勢 低階操作 單點不規則滑動
SingleFreeDrag 觸控手勢 低階操作 單點不規則拖曳
MultiTouch 觸控手勢 低階操作 多點觸控
JSON Press 按鍵操作 高階操作 按鍵輸入
Conversion Test Replay tool (Pytest,
LongPress 按鍵操作 低階操作 長按一按鍵
tool Script Uiautomator, RERAN)
ComboKey 按鍵操作 低階操作 組合鍵操作
硬體感測
LowLevel 低階操作 尚未支援辨識之低階事件

JSON Sleep 流程控制 流程控制 等待一段時間
Test Wait 流程控制 流程控制 等待UI元件出現
Script 流程控制 流程控制 測試斷言
Assert
Play 流程控制 流程控制 播放一段預錄好的腳本
Test Corner

Example of Generated Test Script and


Script Playback Screenshot
Test Corner

• Not all the Android apps can be tested using CR testing tools

• The assertions supported are often limited


• Difficult to modularize and maintain the tests

• Usually platform-dependent, methodology-dependent, …

• Replaying sensor events remains challenging


Test Corner
Test Corner

• A test case is a sequence of keywords

• Separate the automation from the test case design

• No programming skills are needed


Test Corner

An example of a keyword-driven test case

The corresponding test script of the keyword-driven test case


Test Corner

target
trigger event

parameters

• Built-in (i.e., low-level) keywords


• User-defined (i.e., high-level) keywords
Test Corner
Test Corner

different APIs screen sizes internal


hardware custom ROMs
Test Corner

螢幕大小
4”, 5”, 7”,…..
操作模式各異
Back鍵不一定在左邊
有些手機沒有Function key

running an App
successfully on one device may
NOT guarantee the success of
execution on other devices

有些手機沒有Function key
Test Corner

• A collaborative project of four faculty and their students supported


by MOST (formerly known as NSC)
• Testing as a Service (TaaS)
• Automating the testing of Android apps over cloud
• Test Android applications over multiple devices concurrently

• Support multiple Android testing tools,

• Support different types of testing

25
Test Corner
Test Corner
Test Corner
Test Corner

開啟測試
完成測試
報表

Record film
Test Corner
Test Corner
Test Corner

• Test methods:
Test Corner

33

You might also like