SIT: Sampling-based interactive testing for self-adaptive apps

Abstract Self-adaptive applications (“apps” for short) are useful but error-prone. This stems from developers’ inadequate consideration of environmental dynamics and uncertainty. Two features of self-adaptive apps, infinite reaction loop and uncertain interaction , bring additional challenges to software testing and make existing approaches ineffective. In this article, we propose a novel approach SIT ( S ample-based I nteractive T esting) to testing self-adaptive apps effectively and in a light-weight way. Our key insight is that a self-adaptive app’s input space can be systematically split, adaptively explored, and mapped to the testing of the app’s different behavior. This is achieved by our approach’s two components, an interactive app model and a test generation technique. The former captures characteristics of interactions between an app and its environment, and the latter uses adaptive sampling to explore an app’s input space and test its behavior. We experimentally evaluated our approach with real-world self-adaptive apps. The experimental results reported that our SIT improved the bug detection by 22.4–42.2%, but with a smaller time cost. Besides, SIT is also scalable with our tailored optimization techniques.

[1]  Mary Shaw,et al.  Engineering Self-Adaptive Systems through Feedback Loops , 2009, Software Engineering for Self-Adaptive Systems.

[2]  Ying Zhang,et al.  Localization from mere connectivity , 2003, MobiHoc '03.

[3]  Leonardo Mariani,et al.  ZoomIn: Discovering Failures by Detecting Wrong Assertions , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[4]  David S. Rosenblum,et al.  Context-Aware Adaptive Applications: Fault Patterns and Their Automated Identification , 2010, IEEE Transactions on Software Engineering.

[5]  Na Liu,et al.  Concolic Metamorphic Debugging , 2015, 2015 IEEE 39th Annual Computer Software and Applications Conference.

[6]  Xiangyu Zhang,et al.  White box sampling in uncertain data processing enabled by program analysis , 2012, OOPSLA '12.

[7]  Sumit Gulwani,et al.  Proving programs robust , 2011, ESEC/FSE '11.

[8]  Jian Lu,et al.  Adam: Identifying defects in context-aware adaptation , 2012, J. Syst. Softw..

[9]  David S. Rosenblum,et al.  Automated Generation of Context-Aware Tests , 2007, 29th International Conference on Software Engineering (ICSE'07).

[10]  Koushik Sen,et al.  CUTE: a concolic unit testing engine for C , 2005, ESEC/FSE-13.

[11]  Rick Salay,et al.  Partial models: Towards modeling and reasoning with uncertainty , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[12]  Carlo Ghezzi,et al.  Managing non-functional uncertainty via model-driven adaptivity , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[13]  Tsong Yueh Chen,et al.  Adaptive Random Testing: The ART of test case diversity , 2010, J. Syst. Softw..

[14]  Nikolai Tillmann,et al.  Fitness-guided path exploration in dynamic symbolic execution , 2009, 2009 IEEE/IFIP International Conference on Dependable Systems & Networks.

[15]  Ralf Hartmut Güting,et al.  MWGen: A Mini World Generator , 2012, 2012 IEEE 13th International Conference on Mobile Data Management.

[16]  T. H. Tse,et al.  Testing context-aware middleware-centric programs: a data flow approach and an RFID-based experimentation , 2006, SIGSOFT '06/FSE-14.

[17]  Andres J. Ramirez,et al.  Towards run-time testing of dynamic adaptive systems , 2013, 2013 8th International Symposium on Software Engineering for Adaptive and Self-Managing Systems (SEAMS).

[18]  Betty H. C. Cheng,et al.  Towards run-time adaptation of test cases for self-adaptive systems in the face of uncertainty , 2014, SEAMS 2014.

[19]  Arkady B. Zaslavsky,et al.  Context Aware Computing for The Internet of Things: A Survey , 2013, IEEE Communications Surveys & Tutorials.

[20]  David B. Knoester,et al.  Automatically exploring how uncertainty impacts behavior of dynamically adaptive systems , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[21]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[22]  Andreas Zeller,et al.  Mutation-Driven Generation of Unit Tests and Oracles , 2010, IEEE Transactions on Software Engineering.

[23]  Ralf Hartmut Güting,et al.  BerlinMOD: a benchmark for moving object databases , 2009, The VLDB Journal.

[24]  T. H. Tse,et al.  Testing pervasive software in the presence of context inconsistency resolution services , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[25]  Mikkel Baun Kjærgaard,et al.  The impact of sensor errors and building structures on particle filter-based inertial positioning , 2012, Pervasive Mob. Comput..

[26]  David S. Rosenblum,et al.  Model-based fault detection in context-aware adaptive applications , 2008, SIGSOFT '08/FSE-16.

[27]  Seyed Masoud Sadjadi,et al.  Composing adaptive software , 2004, Computer.

[28]  Volker Gruhn,et al.  A model-based approach to test automation for context-aware mobile applications , 2014, SAC.

[29]  Vaninha Vieira,et al.  A context simulator as testing support for mobile apps , 2015, SAC.

[30]  Porfirio Tramontana,et al.  Considering Context Events in Event-Based Testing of Mobile Applications , 2013, 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation Workshops.

[31]  Andres J. Ramirez,et al.  A taxonomy of uncertainty for dynamically adaptive systems , 2012, 2012 7th International Symposium on Software Engineering for Adaptive and Self-Managing Systems (SEAMS).

[32]  Vlado Handziski,et al.  Poster: A Context Simulation Harness for Realistic Mobile App Testing , 2015, MobiSys.

[33]  Stephen S. Yau,et al.  Testing context-sensitive middleware-based software applications , 2004, Proceedings of the 28th Annual International Computer Software and Applications Conference, 2004. COMPSAC 2004..

[34]  Koushik Sen,et al.  DART: directed automated random testing , 2005, PLDI '05.

[35]  Anand R. Tripathi,et al.  A Framework for Programming Robust Context-Aware Applications , 2010, IEEE Transactions on Software Engineering.

[36]  Christoffer Quist Adamsen,et al.  Systematic execution of Android test suites in adverse conditions , 2015, ISSTA.

[37]  Youngki Lee,et al.  MobiCon: Mobile context monitoring platform: Incorporating context-awareness to smartphone-centric personal sensor networks , 2012, 2012 9th Annual IEEE Communications Society Conference on Sensor, Mesh and Ad Hoc Communications and Networks (SECON).

[38]  Jian Lu,et al.  Verifying self-adaptive applications suffering uncertainty , 2014, ASE.

[39]  Hongseok Yang,et al.  Automated concolic testing of smartphone apps , 2012, SIGSOFT FSE.

[40]  Minsu Jang,et al.  Simulation framework for testing context-aware ubiquitous applications , 2005, The 7th International Conference on Advanced Communication Technology, 2005, ICACT 2005..

[41]  Shih-Kun Huang,et al.  A black-box based android GUI testing system , 2013, MobiSys '13.

[42]  Naeem Esfahani,et al.  A framework for managing uncertainty in self-adaptive software systems , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[43]  Jian Lu,et al.  Environment rematching: Toward dependability improvement for self-adaptive applications , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[44]  Ranveer Chandra,et al.  Caiipa: automated large-scale mobile app testing through contextual fuzzing , 2014, MobiCom.

[45]  Mukul R. Prasad,et al.  Automated testing with targeted event sequence generation , 2013, ISSTA.