Computer Science ›› 2017, Vol. 44 ›› Issue (11): 27-32.doi: 10.11896/j.issn.1002-137X.2017.11.005

Previous Articles     Next Articles

Concurrency Bugs Verification in Android Applications Based on Test Case Generation

SHE Yi, TANG Hong-yin, WU Guo-quan, CHEN Wei, WEI Jun and HUANG Tao   

  • Online:2018-12-01 Published:2018-12-01

Abstract: Android application is an event-based concurrent program.Data race is common in Android apps due to unforeseen threads interleaving coupled with non-deterministic reordering of asynchronous events.Existing race detection tools for Android applications will report false positive,and cannot replay the concurrent bugs caused by race.To address this issue,this paper proposed a new technique to expose race based on the results obtained from existing race detection tools.Our technique firstly builds state transition graph (STG) for targeted application,and generates a test case that has potential data races based on the STG and the results reported by existing race detection tools.Then it resche-dules test cases execution by controlling event dispatching and thread interleaving to determine whether such potential races really lead to thrown exceptions.Our experiments show that this technique is effective,and it can confirm and replay concurrency bug caused by real data races,while at the same time eliminates false warnings for Android apps.

Key words: Record/Replay,Data race,Mobile application,Android,Testing

[1] SAFI G,SHAHBAZIAN A,HALFOND W G J,et al.Detecting event anomalies in event-based systems[C]∥Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering.ACM,2015:25-37.
[2] BIELIK P,RAYCHEV V,VECHEV M.Scalable race detection for android applications[J].ACM SIGPLAN Notices,2015,50(10):332-348.
[3] YANG S,YAN D,WU H,et al.Static control-flow analysis of user-driven callbacks in Android applications[C]∥Proceedings of the 37th International Conference on Software Engineering-Volume 1.IEEE,2015:89-99.
[4] YANG S,ZHANG H,WU H,et al.Static Window Transition Graphs for Android (T)[C]∥2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).IEEE,2015:658-668.
[5] CHOI W,NECULA G,SEN K.Guided gui testing of android apps with minimal restart and approximate learning[J].ACM SIGPLAN Notices,2013,48(10):623-640.
[6] AZIM T,NEAMTIU I.Targeted and depth-first exploration for systematic testing of android apps[J].ACM SIGPLAN Notices,2013,48(10):641-660.
[7] MAIYA P,KANADE A,MAJUMDAR R.Race detection forAndroid applications[C]∥ACM SIGPLAN Notices.2014:316-325.
[8] HSIAO C H,YU J,NARAYANASAMY S,et al.Race detection for event-driven mobile applications[J].ACM SIGPLAN Notices,2014,49(6):326-336.
[9] Espresso.
[10] PETROV B,VECHEV M,SRIDHARAN M,et al.Race detection for web applications[J].ACM SIGPLAN Notices,2012,47(6):251-262.
[11] RAYCHEV V,VECHEV M,S RIDHARAN M.Effective race detection for event-driven programs[J].ACM SIGPLAN Notices,2013,48(10):151-166.
[12] LIN Y,RADOI C,DIG D.Retrofitting concurrency for android applications through refactoring[C]∥Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering.ACM,2014:341-352.
[13] SEN K.Race directed random testing of concurrent programs[J].ACM SIGPLAN Notices,2008,43(6):11-21.
[14] Robtotium.Github.

No related articles found!
Full text



No Suggested Reading articles found!