Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2970276.2970320acmconferencesArticle/Chapter ViewAbstractPublication PagesaseConference Proceedingsconference-collections
short-paper

Generating test cases to expose concurrency bugs in Android applications

Published: 25 August 2016 Publication History

Abstract

Mobile systems usually support an event-based model of concurrent programming. This model, although advantageous to maintain responsive user interfaces, may lead to subtle concurrency errors due to unforeseen threads interleaving coupled with non-deterministic reordering of asynchronous events. These bugs are very difficult to reproduce even by the same user action sequences that trigger them, due to the undetermined schedules of underlying events and threads. In this paper, we proposed RacerDroid, a novel technique that aims to expose concurrency bugs in android applications by actively controlling event schedule and thread interleaving, given the test cases that have potential data races. By exploring the state model of the application constructed dynamically, our technique starts first to generate a test case that has potential data races based on the results obtained from existing static or dynamic race detection technique. Then it reschedules test cases execution by actively controlling event dispatching and thread interleaving to determine whether such potential races really lead to thrown exceptions or assertion violations. Our preliminary experiments show that RacerDroid is effective, and it confirms real data races, while at the same time eliminates false warnings for Android apps found in the wild.

References

[1]
V. Raychev, M. T. Vechev, and M. Sridharan. Effective race detection for event-driven programs. In OOPSLA, pages 151–166, 2013.
[2]
B. Petrov, M. Vechev, M. Sridharan, and J. Dolby. Race detection for web applications. In PLDI ’12, pp.251-262.
[3]
D. R. Engler and K. Ashcraft. RacerX: Effective, Static Detection of Race Conditions and Deadlocks. In SOSP, pages 237–252, 2003.
[4]
J. W. Voung, R. Jhala, and S. Lerner. RELAY: Static Race Detection on Millions of Lines of Code. In ESEC/SIGSOFT FSE, pages 205–214, 2007.
[5]
C. Flanagan and S. N. Freund. FastTrack: Efficient and Precise Dynamic Race Detection. In PLDI, pages 121–133, 2009.
[6]
R. H. B. Netzer. Optimal Tracing and Replay for Debugging Shared-Memory Parallel Programs. In Workshop on Parallel and Distributed Debugging, pages 1–11, 1993.
[7]
C.-H. Hsiao, J. Yu, S. Narayanasamy, Z. Kong, C. L. Pereira, G. A. Pokam, P. M. Chen, and J. Flinn. Race detection for event-driven mobile applications. In PLDI ’14, pp.326-336.
[8]
P. Maiya, A. Kanade, and R. Majumdar. Race detection for android applications. In PLDI ’14, pp.316-325.
[9]
P. Bielik, V. Raychev, and M. T. Vechev. Scalable race detection for android applications. In OOPSLA, pages 332– 348. ACM, 2015.
[10]
G. Safi, A. Shahbazian, W.G. J. Halfond, and N. Medvidovic. Detecting event anomalies in event-based systems. In FSE 2015, pp.25-37.
[11]
Yu Lin, Cosmin Radoi, and Danny Dig. Retrofitting concurrency for Android applications through refactoring. In FSE 2014, pp.341-252.
[12]
A. M. Fard, M. Mirzaaghaei, and A. Mesbah. Leveraging existing tests in automated test generation for web applications. In ASE 2014, pages 67–78.
[13]
W. Choi, G. Necula, and K. Sen. Guided gui testing of android apps with minimal restart and approximate learning. In OOPSLA ’13, pp.623-640.
[14]
Tanzirul Azim and Iulian Neamtiu. Targeted and depth-first exploration for systematic testing of android apps. In OOPSLA ’13, pp.641-660.
[15]
Shengqian Yang, Dacong Yan, Haowei Wu, Yan Wang, and Atanas Rountev. Static control-flow analysis of user-driven callbacks in Android applications. In ICSE '15, pp.89-99.
[16]
Shengqian Yang, Hailong Zhang, Haowei Wu, et. al. Static Window Transition Graphs for Android. In ASE’15, pp.658- 668.
[17]
Robtotium. Github. https://github.com/RobotiumTech /robotium
[18]
Espresso. https://google.github.io/android-testing-supportlibrary/docs/espresso/
[19]
Smali. Github. https://github.com/JesusFreke/smali
[20]
Koushik Sen. 2008. Race directed random testing of concurrent programs. In PLDI '08, pp.11-21.
[21]
O. Edelstein, E. Farchi, Y. Nir, G. Ratsaby, and S. Ur. Multithreaded Java program test generation. IBM Systems Journal, 41(1): 111–125, 2002
[22]
S. D. Stoller. Testing concurrent Java programs using randomized scheduling. In Workshop on Runtime Verification (RV’ 02), volume 70 of ENTCS, 2002
[23]
K. Sen. Effective random testing of concurrent programs. In ASE’ 07, pp. 323-332.
[24]
Lorenzo Gomez, Iulian Neamtiu, Tanzirul Azim, and Todd Millstein. RERAN: timing- and touch-sensitive record and replay for Android. In ICSE '13, pp.72-81.
[25]
Hu, Yongjian, Tanzirul Azim, and Iulian Neamtiu. "Versatile yet lightweight record-and-replay for Android." In OOPSLA’15, pp.349-366.
[26]
Android Accessibility. http://developer.android.com/guide/ topics/ui/accessibility/index.html
[27]
H. Yee, S. Pattanaik, and D. P. Greenberg. Spatiotemporal Sensitivity and Visual Attention for Efficient Rendering of Dynamic Environments. ACM Trans. Graph., 20(1), Jan. 2001.
[28]
UI Automator. http://developer.android.com/tools/testingsupport-library/index.html#UIAutomator.

Cited By

View all
  • (2024)Brewing Up Reliability: Espresso Test Generation for Android Apps2024 IEEE Conference on Software Testing, Verification and Validation (ICST)10.1109/ICST60714.2024.00025(185-196)Online publication date: 27-May-2024
  • (2023)Detection of Java Basic Thread Misuses Based on Static Event Analysis2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE56229.2023.00145(1049-1060)Online publication date: 11-Sep-2023
  • (2022)On the feasibility and challenges of synthesizing executable Espresso testsProceedings of the 3rd ACM/IEEE International Conference on Automation of Software Test10.1145/3524481.3527234(92-102)Online publication date: 19-Jul-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ASE '16: Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering
August 2016
899 pages
ISBN:9781450338455
DOI:10.1145/2970276
  • General Chair:
  • David Lo,
  • Program Chairs:
  • Sven Apel,
  • Sarfraz Khurshid
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 25 August 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. android
  2. data race
  3. mobile application
  4. record/replay
  5. testing

Qualifiers

  • Short-paper

Funding Sources

Conference

ASE'16
Sponsor:

Acceptance Rates

Overall Acceptance Rate 82 of 337 submissions, 24%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)6
  • Downloads (Last 6 weeks)1
Reflects downloads up to 13 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Brewing Up Reliability: Espresso Test Generation for Android Apps2024 IEEE Conference on Software Testing, Verification and Validation (ICST)10.1109/ICST60714.2024.00025(185-196)Online publication date: 27-May-2024
  • (2023)Detection of Java Basic Thread Misuses Based on Static Event Analysis2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE56229.2023.00145(1049-1060)Online publication date: 11-Sep-2023
  • (2022)On the feasibility and challenges of synthesizing executable Espresso testsProceedings of the 3rd ACM/IEEE International Conference on Automation of Software Test10.1145/3524481.3527234(92-102)Online publication date: 19-Jul-2022
  • (2022)ReCDroid+: Automated End-to-End Crash Reproduction from Bug Reports for Android AppsACM Transactions on Software Engineering and Methodology10.1145/348824431:3(1-33)Online publication date: 7-Mar-2022
  • (2021)Dynamic Detection of AsyncTask Related Defects2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS)10.1109/QRS54544.2021.00047(357-366)Online publication date: Dec-2021
  • (2021)ANCHOR: locating android framework-specific crashing faultsAutomated Software Engineering10.1007/s10515-021-00290-128:2Online publication date: 1-Nov-2021
  • (2020)A Survey of Context Simulation for Testing Mobile Context-Aware ApplicationsACM Computing Surveys10.1145/337278853:1(1-39)Online publication date: 6-Feb-2020
  • (2020)Static asynchronous component misuse detection for Android applicationsProceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3368089.3409699(952-963)Online publication date: 8-Nov-2020
  • (2020)ER catcherProceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering10.1145/3324884.3416639(324-335)Online publication date: 21-Dec-2020
  • (2020)Exposing Android Event-Based Races by Selective Branch Instrumentation2020 IEEE 31st International Symposium on Software Reliability Engineering (ISSRE)10.1109/ISSRE5003.2020.00033(265-276)Online publication date: Oct-2020
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media