透過您的圖書館登入
IP:3.149.26.246
  • 學位論文

針對安卓應用程式跨硬體之軟體測試

Automated Adaptive Test for Android Apps on Diversified Touchscreen Devices

指導教授 : 謝續平

摘要


近年來,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.

參考文獻


[11] L.-S. Huang, A. Moshchuk, H. J. Wang, S. Schechter, and C. Jackson. Clickjacking: attacks and defenses. In USENIX Security Symposium (2012).
[5] X. Yuan and A. M. Memon. Generating event sequence-based test cases using GUI runtime state feedback. In IEEE Transactions on Software Engineering (2010).
[6] F. Maggi, A. Valdi, and S. Zanero. AndroTotal: a flexible, scalable toolbox and service for testing mobile malware detectors. In ACM workshop on Security and privacy in smartphones & mobile devices (2013).
[7] W. Choi, G. Necula, and K. Sen. Guided gui testing of android apps with minimal restart and approximate learning. In ACM SIGPLAN international conference on Object oriented programming systems languages & applications (2013).
[8] W. Yang, M. R. Prasad, and T. Xie. A grey-box approach for automated GUI-model generation of mobile applications. In Springer on Fundamental Approaches to Software Engineering (2013).

被引用紀錄


吳芙蓉(2009)。我國更生理念變遷-從矯治復歸到風險管理〔碩士論文,國立臺灣大學〕。華藝線上圖書館。https://doi.org/10.6342/NTU.2009.01722

延伸閱讀