ALMEIDA, DIEGO R.; http://lattes.cnpq.br/4761728575662561; ALMEIDA, Diego Rodrigues de.
Resumo:
Smartphones usually have several sensors such as touch screen, compass, gyroscope, GPS, accelerometer, pedometer, and so on, allowing applications to be aware of the environment on which they are running. Context-aware applications are event-driven applications that sense and react to context information given by sensors to provide information and/or services to the user. Compared to desktop and web applications, context-aware applications present additional challenges to testing. These applications must process input from users as well as various input values from constantly changing contexts that can lead to the explosion of possible situations, some of which are very difficult to execute. A widely used class of context-sensitive applications are path-based applications. These applications continuously and in real-time monitor the path that the user takes while using the application. This work aims to present an approach that makes it possible the black-box testing of context-aware path-based Android applications and, in this way, makes it possible to select and execute an viable set of scenarios to be tested. Our approach consists of selecting, through pairwise testing, combinations of sensor values with events that occur during the execution of the application under test (AUT). We developed a tool that allows the tester to execute context variation by simulating sensor values in an emulated environment that makes it possible to test scenarios that would be difficult to execute manually. The tool currently supports GPS context data and internet status connection. These kind of data is used by almost all available applications nowadays. To evaluate our approach, we performed an empirical study with four real GPS based applications widely downloaded by Android users. Our results show that our approach was able to execute an viable set of different scenarios and to find 13 defects in the four applications, of which 6 are context defects, with 2 of them detected when executing challenging scenarios for manual execution. Combining pairwise testing with the execution of test cases in an emulated environment proved to be effective. It allowed us to find context defects in applications widely used with an viable set of test cases.