標題: 針對安卓應用程式跨硬體之軟體測試
Automated Adaptive Test for Android Apps on Diversified Touchscreen Devices
作者: 李善新
Li, Shan-Hsin
謝續平
資訊科學與工程研究所
關鍵字: 安卓;適應性測試;手勢;軟體測試;紀錄與重現;Android;adaptive test;gesture;software testing;record and replay
公開日期: 2013
摘要: 近年來,Android平台發展迅速,各式裝置之間的規格差異越來越大。但維持不變的是,大多數的Android應預程式依然維持仰賴使用者觸控螢幕的手勢做為主要的輸入途徑。由此可知,利用模擬使用者手勢來進行軟體測試也是一項重要的測試因子。但由於螢幕大小的變化,使用者對裝置操作的手勢行為也跟著不同,藉此,要利用模擬手勢來進行測試變得相當困難。測試工程師必須為不同規格的裝置撰寫一份專屬的測試腳本。現階段提出了一些解決方案,利用對座標的線性縮放來符合不同的螢幕大小,但這種方法只對部分相同長寬比例的螢幕適用。因此,我們提出了一種「視覺導向手勢」。視覺導向手勢遵從一般使用者對裝置互動的過程來達成手勢的模擬行為:檢視畫面;尋找物件;對物件做觸碰行為。藉由這樣的流程,讓測試腳本能夠隨著目標裝置的螢幕大小及介面變動而自我調整,同時達到對測試腳本的「一次編寫,到處運行」的特性。在實驗中,我們針對了20隻從Google Play上下載的應用程式,各自進行了平均4種的測試腳本,並且在4種不同規格的機器上運行,其中有84.4%成功運作。另外,我們也針對不同裝置及不同應用程式提出了一個期望指數。在模擬手勢的測試之前,藉由我們的期望指數可以告知測試工程師,該應用程式或該裝置能夠成功運作的機率值。
Android, which is compatible to various models, mainly takes user input from touchscreen, and even the screens are distinct among each other. Due to the screen diversity, to imitate user gestures for software testing becomes difficult and unfeasible to reuse a test script, which records fixed coordinates of touch events, among various devices. Test engineers need to write a specific test script for each kind of devices. Conventional approaches can only scale up/down the coordinate when the tested screen resolution is different; this approach is only feasible when the screens have the same aspect ratio. To address this problem, an adaptive test for Android is proposed, and it is based on a new gesture representation, the Visual-Oriented Gesture (VOG). The adaptive test imitates user interaction in the following order: looking screen, finding the GUI component, and doing action on it. VOG can dynamically adjust the coordinates of touch events, and therefore the test achieved the “Write-once-run-anywhere” (WORA) property; it can reduce the time cost of development. Over twenty apps from Google Play have been evaluated in this paper, and each app has been tested by around 4 kinds of gestures on 4 different screen resolution models. The percentage of successfully imitating is 84.4 from over 300 test cases. The result of this experiment is satisfiable. We show the proposed adaptive test can imitate most user gesture on apps across various screen resolutions and Android versions, so it is helpful to development on Android.
URI: http://140.113.39.130/cdrfb3/record/nctu/#GT070156094
http://hdl.handle.net/11536/75527
顯示於類別:畢業論文