Example: barber

Reducing Combinatorics in GUI Testing of Android Applications

Reducing Combinatorics in GUI Testing ofAndroid ApplicationsNariman Mirzaei Joshua Garcia*Hamid Bagheri*Alireza Sadeghi*Sam Malek* Department of Computer ScienceGeorge Mason of InformaticsUniversity of California, rising popularity of Android and the GUI-driven nature of itsapps have motivated the need for applicable automated GUI testingtechniques. Although exhaustive Testing of all possible combina-tions is the ideal upper bound in combinatorial Testing , it is ofteninfeasible, due to the combinatorial explosion of test cases. Thispaper presentsTrimDroid, a framework for GUI Testing of Androidapps that uses a novel strategy to generate tests in a combinatorial ,yet scalable, fashion.

Android, Software Testing, Input Generation 1. INTRODUCTION With well over a million apps, Android has become one of the dominant mobile platforms [16]. Android app markets, such as ... coverage as exhaustive combinatorial testing, but reduces the num-ber of test cases by 57.86% on average and by as much as 99.9%.

Tags:

  Introduction, Testing, Combinatorial, Combinatorial testing

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Reducing Combinatorics in GUI Testing of Android Applications

1 Reducing Combinatorics in GUI Testing ofAndroid ApplicationsNariman Mirzaei Joshua Garcia*Hamid Bagheri*Alireza Sadeghi*Sam Malek* Department of Computer ScienceGeorge Mason of InformaticsUniversity of California, rising popularity of Android and the GUI-driven nature of itsapps have motivated the need for applicable automated GUI testingtechniques. Although exhaustive Testing of all possible combina-tions is the ideal upper bound in combinatorial Testing , it is ofteninfeasible, due to the combinatorial explosion of test cases. Thispaper presentsTrimDroid, a framework for GUI Testing of Androidapps that uses a novel strategy to generate tests in a combinatorial ,yet scalable, fashion.

2 It is backed with automated program analy-sis and formally rigorous test generation engines. TrimDroid relieson program analysis to extract formal specifications. These speci-fications express the app s behavior ( , control flow between thevarious app screens) as well as the GUI elements and their depen-dencies. The dependencies among the GUI elements comprisingthe app are used to reduce the number of combinations with thehelp of a solver. Our experiments have corroborated TrimDroid sability to achieve a comparable coverage as that possible under ex-haustive GUI Testing using significantly fewer test , Software Testing , Input Generation1.

3 INTRODUCTIONWith well over a million apps, Android has become one of thedominant mobile platforms [16]. Android app markets, such asGoogle Play, have created a fundamental shift in the way softwareis delivered to consumers, with thousands of apps added and up-dated on a daily basis. The majority of these apps are developedat a nominal cost by entrepreneurs that do not have the resourcesfor properly Testing their software. Hence, there is an increasingdemand for applicable automated Testing techniques. One key ob-stacle towards achieving test automation for GUI-driven Androidapps is the lack of effective techniques for test input recent study of existing tools by Choudhary et al.

4 [15] claimsAndroid Monkey [1], a random- Testing program for Android , to bethe winner among the existing test input generation tools. AndroidMonkey provides a random mechanism that often achieves shallowcode coverage. Several recent research efforts [8, 9, 11, 21, 27, 38],including our own [28 31], have aimed to improve Android testingPermission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor profit or commercial advantage and that copies bear this notice and the full cita-tion on the first page.

5 Copyrights for components of this work owned by others thanACM must be honored. Abstracting with credit is permitted. To copy otherwise, or re-publish, to post on servers or to redistribute to lists, requires prior specific permissionand/or a fee. Request permissions from 16 Austin, Texas USAc 2016 ACM. ISBN 978-1-4503-3900-1/16/05.. $ : However, to the best of our knowledge, no prior researchhas explored afully automatedcombinatorial GUI Testing approachin the context of is mainly becauseexhaustivecombinatorial GUI Testing isoften viewed to be impractical due to the explosion of possiblecombinations for even the smallest Applications [19].

6 A more prac-tical alternative ist-waycombinatorial Testing [33], where all com-binations for only a subset of GUI widgets ( ,t) are consid-ered [20]. But even under t-way Testing , the number of generatedtest cases could grow rapidly. Moreover, without a systematic ap-proach to determine the interactions, arbitrary selection oftwid-gets to be combinatorily tested is bound to be less effective thanan exhaustive approach in terms of both code coverage and opportunity to automate the Testing activities in Android ispresented by the fact that apps are developed on top of anAppli-cation Development Framework (ADF).

7 The Android ADF ensuresapps developed by a variety of suppliers can interoperate and coex-ist together in a single system (a phone), as long as they conformto the rules and constraints imposed by the framework. The An-droid ADF constrains the life cycle of components comprising anapp, the styles of communication among its software components,and the ways in which GUI widgets ( , buttons, check-boxes)and other commonly needed functionalities ( , GPS coordinates,camera) can be accessed. An underlying insight in our researchis that the knowledge of these constraints along with the metadataassociated with each app can be used to automate many softwaretesting activities, specifically combinatorial Testing of this paper, we present TrimDroid (TestingReduced GUICoMbinations for AndDROID), a fully-automated combinatorialtesting approach for Android apps.

8 Given an Android APK file,TrimDroid employs static analysis techniques that are informed bythe rules and constraints imposed by the Android ADF to identifyGUI widgets that interact with one , the set of inter-acting widgets become candidates for t-way combinatorial avoiding the generation of tests for widgets that do not inter-act, TrimDroid is able to significantly reduce the number of identifying the interactions, TrimDroid statically analyzes thecontrol- and data-flow dependencies among the widgets and actionsavailable on an app. Finally, TrimDroid uses an efficient constraintsolver to enumerate the test cases covering all possible combina-tions of GUI widgets and evaluation of TrimDroid shows that it achieves the samecoverage as exhaustive combinatorial Testing , but reduces the num-ber of test cases by on average and by as much as reduction is important, as it not only reduces the time it takesto execute the test cases.

9 But also significantly decreases the effortrequired to inspect the test APK file is a Java bytecode package used to install paper is organized as follows. Section 2 presents an illustra-tive app to motivate and describe the research. Section 3 providesan overview of TrimDroid. Sections 4 and 5 describe the extractionof required models and dependencies from apps. Sections 6 and 7describe enumeration of execution scenarios and generation of testcases, respectively. Section 8 presents our experimental evaluationof TrimDroid. The paper concludes with an overview of the relatedresearch, and a discussion of our future ILLUSTRATIVE EXAMPLEWe use a simple Android app, called Expense Reporting System(ERS), to illustrate our research.

10 This app allows a user to maintaina log of meal expenses incurred during a trip. Figure 1 depicts twoof ERS themainActivity, , it is the first screenpresented to the user when an app is invoked. FromNewRepor-tActivity, the user can select theDestination, enter an allowable ex-penseAmount, theCurrency, and initiate the creation of two typesof reports:Itemized ReportandQuick the user to enter an itemized list of meal expenses,including (1) the total days of the trip, and (2) the number of mealspurchased on the trip s first and last day. WhenTotal Daysis 1 ( ,the first and last days are the same), the check-boxes correspond-ing to the last day meals are disabled (see Figure 1a).


Related search queries