Automating GUI Testing for Android Applications
Cuixiong Hu Iulian Neamtiu
Department of Computer Science and Engineering University of California, Riverside, CA, USA
Users increasingly rely on mobile applications for computational needs. Google Android is a popular mobile platform, hence the reliability of Android applications is becoming increasingly important. Many Android correctness issues, however, fall outside the scope of traditional veriﬁcation techniques, as they are due to the novelty of the platform and its GUI-oriented application construction paradigm. In this paper we present an approach for automating the testing process for Android applications, with a focus on GUI bugs. We ﬁrst conduct a bug mining study to understand the nature and frequency of bugs aﬀecting Android applications; our study ﬁnds that GUI bugs are quite numerous. Next, we present techniques for detecting GUI bugs by automatic generation of test cases, feeding the application random events, instrumenting the VM, producing log/trace ﬁles and analyzing them post-run. We show how these techniques helped to re-discover existing bugs and ﬁnd new bugs, and how they could be used to prevent certain bug categories. We believe our study and techniques have the potential to help developers increase the quality of Android applications.
Categories and Subject Descriptors
D.2.4 [Software Engineering]: Software/Program Veriﬁcation—Reliability; D.2.5 [Software Engineering]: Testing and Debugging—Testing tools,Tracing
Test automation, Mobile applications, Google Android, GUI testing, Test case generation, Empirical bug studies
Smartphones are becoming pervasive, with more than 195 million sold worldwide in the ﬁrst three quarters of 2010
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 proﬁt or commercial advantage and that copies bear this notice and the full citation on the ﬁrst page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior speciﬁc permission and/or a fee. AST ’11, May 23-24, 2011, Waikiki, Honolulu, HI, USA Copyright 2011 ACM 978-1-4503-0592-1/11/05 ...$10.00.
alone [23, 22, 24]. A major draw of any smartphone is its ability to run applications, thus users are increasingly relying on smartphones for computing needs, rather than using laptops or desktops. This leads to an increasing impetus for ensuring the reliability of mobile applications. Reliability is particularly important for sensitive mobile applications such as online banking, business management, health care, or military domains. In this paper we focus on ensuring the reliability of mobile applications running on the Google Android platform. According to Fall 2010 reports, Android is the second most popular mobile OS, surpassing BlackBerry and iPhone OS, and will be tied for number one with Nokia’s Symbian by 2014 [29, 24]; Android is in fact the only mobile OS platform to gain market share since Q4’09 [23, 22, 24]. The Android ecosystem includes the Android Market, which currently lists more than 220,000 applications, 12,316 of which were added in December 2010 alone, and an estimated 2.6 billion downloads . Many tools and techniques exist for automating the testing of mature, well-established applications, such as desktop or server programs. However, the physical constraints of mobile devices (e.g., low-power CPU, small memory, small display), as well as developers’ unfamiliarity with mobile platforms (due to their novelty), make mobile applications prone to new kinds of bugs. For example, an Android application is structured around activities (GUI windows), broadcast receivers, services and content providers; this is diﬀerent from standard server applications, or from an...
Please join StudyMode to read the full document