Mining Android API Usage to Generate Unit Test Cases for Pinpointing Compatibility Issues
Xiaoyu Sun, Xiao Chen, Yanjie Zhao, Pei Liu, John Grundy, Li Li

TL;DR
This paper introduces JUnitTestGen, a tool that mines Android API usage from real apps to generate unit tests, helping identify compatibility issues across Android versions more effectively than prior signature-based methods.
Contribution
The paper presents a novel approach to generate unit tests from Android API usage, addressing a broader range of compatibility issues beyond signature mismatches.
Findings
Effective in generating valid unit test cases for Android APIs.
Helps pinpoint various compatibility issues, including semantic code changes.
Improves detection of compatibility problems in real-world Android apps.
Abstract
Despite being one of the largest and most popular projects, the official Android framework has only provided test cases for less than 30% of its APIs. Such a poor test case coverage rate has led to many compatibility issues that can cause apps to crash at runtime on specific Android devices, resulting in poor user experiences for both apps and the Android ecosystem. To mitigate this impact, various approaches have been proposed to automatically detect such compatibility issues. Unfortunately, these approaches have only focused on detecting signature-induced compatibility issues (i.e., a certain API does not exist in certain Android versions), leaving other equally important types of compatibility issues unresolved. In this work, we propose a novel prototype tool, JUnitTestGen, to fill this gap by mining existing Android API usage to generate unit test cases. After locating Android API…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware System Performance and Reliability · Software Engineering Research · Advanced Malware Detection Techniques
