2012年6月21日星期四

Android Testing Harness

Our goal is to automatically generated action sequences which satisfied following two objectives:
1. The action sequence would guide the execution to cover most part of the program.
2. The actions in the sequence are all valid, i.e. program has corresponding reaction for the action.

Atif Memon has written several papers on GUI ripping of traditional desktop software, and he presented an event-flow graph model to guide the ripping process. While it comes to mobile applications, their approach would not be effective anymore. This is due to following reasons:
1. Android's gestures are far more than "clicking". If we just use clicking action, the whole ripping process may only lead to a low coverage rate, thus the whole ripping process becomes meaningless. On the other hand, if we  perform every action that a GUI component could possibly perform, first, the action sequence will be full of meaningless actions. Second, the ripping process would take a long time.
2. The GUI structure of Android interface would not remain unchanged. Because of the screens of mobile phone are all quite small, the app's developer often provide user their own right to arrange the UI layout based on their own preference. Thus, the event-flow graph get from the ripping process could be only part of the big picture. Once the layout becomes different than it be in the ripping process, the whole event flow model would not work.
3. The actions are no longer limited to the widget. The events that an Android program could respond to are far more than those actions could be fired on the widget. You can press "menu" and "back" button at any moment of the execution. You can swipe the whole screen so that it will goes to another screen. You can change the orientation of the phone so that the layout of the screen ,the elements show up, and the responding actions could all be changed. Atif's event flow model is based on the event can be carried out on a widget. The code coverage could be low if other events are not properly fired.

没有评论: