Summary: | 碩士 === 國立臺北科技大學 === 資訊工程系研究所 === 103 === As the quality of Android applications is getting more concerns, the automatic testing of Android applications has drawn much attention. Generally, test scripts are often written manually or generated automatically using a capture-replay (C/R) testing tool. The C/R tools can reduce the efforts on writing test scripts through recording user actions into scripts and then playing back the actions to perform the tests. Currently, few C/R testing tools take the virtual views of Android into account. As a result, some specific actions on the components mainly composed by virtual views, like TimePicker and DatePicker, cannot be captured by those tools. Moreover, the recorded scripts may fail to replay correct user actions because of wrongly interpreting an ambiguous user action, like a swipe-down gesture which can be a refresh action or a scroll up action at the same time. This can cause differences in recording and playing user actions and, hence, can lead to testing errors. In view of this, the thesis proposes a C/R testing method for Android applications based on intercepting user input events and accessibility events, as well as tracking the runtime states and accessibility information of views, to capture user actions. For an ambiguous user action, the proposed method will generate scripts containing all possible interpretations of the recorded action and allow testers to manually decide what action to replay later. In addition, a tool called Cartoid is implemented to support the proposed method and a set of flexible APIs is provided to facilitate the extension of the tool. Furthermore, a case study on applying the Cartoid is also presented to demonstrate the usefulness of the proposed method.
|