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



[1] LEI Li-hui and WANG Jing. Parallelization of LTL Model Checking Based on Possibility Measure[J]. Computer Science, 2018, 45(4): 71 -75, 88 .
[2] XIA Qing-xun and ZHUANG Yi. Remote Attestation Mechanism Based on Locality Principle[J]. Computer Science, 2018, 45(4): 148 -151, 162 .
[3] LI Bai-shen, LI Ling-zhi, SUN Yong and ZHU Yan-qin. Intranet Defense Algorithm Based on Pseudo Boosting Decision Tree[J]. Computer Science, 2018, 45(4): 157 -162 .
[4] WANG Huan, ZHANG Yun-feng and ZHANG Yan. Rapid Decision Method for Repairing Sequence Based on CFDs[J]. Computer Science, 2018, 45(3): 311 -316 .
[5] SUN Qi, JIN Yan, HE Kun and XU Ling-xuan. Hybrid Evolutionary Algorithm for Solving Mixed Capacitated General Routing Problem[J]. Computer Science, 2018, 45(4): 76 -82 .
[6] ZHANG Jia-nan and XIAO Ming-yu. Approximation Algorithm for Weighted Mixed Domination Problem[J]. Computer Science, 2018, 45(4): 83 -88 .
[7] WU Jian-hui, HUANG Zhong-xiang, LI Wu, WU Jian-hui, PENG Xin and ZHANG Sheng. Robustness Optimization of Sequence Decision in Urban Road Construction[J]. Computer Science, 2018, 45(4): 89 -93 .
[8] LIU Qin. Study on Data Quality Based on Constraint in Computer Forensics[J]. Computer Science, 2018, 45(4): 169 -172 .
[9] ZHONG Fei and YANG Bin. License Plate Detection Based on Principal Component Analysis Network[J]. Computer Science, 2018, 45(3): 268 -273 .
[10] SHI Wen-jun, WU Ji-gang and LUO Yu-chun. Fast and Efficient Scheduling Algorithms for Mobile Cloud Offloading[J]. Computer Science, 2018, 45(4): 94 -99, 116 .