In recent years, several automated GUI testing techniques for An-droid apps have been proposed. These tools have been shown tobe effective in achieving good test coverage and in finding bugswithout human intervention. Being automated, these tools typicallyrun for a long time (say, for several hours), either until they saturatetest coverage or until a testing time budget expires. Thus, theseautomated tools are not good at generating concise regression testsuites that could be used for testing in incremental development ofthe apps and in regression testing.We propose a heuristic technique that helps create a small regres-sion test suite for an Android app from a large test suite generatedby an automated Android GUI testing tool. The key insight behindour technique is that if we can identify and remove some com-mon forms of redundancies introduced by existing automated GUItesting tools, then we can drastically lower the time required tominimize a GUI test suite. We have implemented our algorithm ina prototype tool called DetReduce. android app ideas for college students project We applied DetReduce to sev-eral Android apps and found that DetReduce reduces a test-suiteby an average factor of 16.9×in size and 14.7×in running time.We also found that for a test suite generated by running Swift-Hand and a randomized test generation algorithm for 8 hours,DetReduce minimizes the test suite in an average of 14.6 hours.
Automated GUI testing tools, such as Monkey , A3E , Dyn-odroid , MobiGUITAR , and Orbit , explore the GUI of anapp automatically without any prior knowledge about the behaviorof the app. These automated tools are, however, not good at gener-ating concise regression test suites that could be used for testing inincremental development of the apps and in regression testing. Wepropose a heuristic technique that helps to create a small regressiontest suite for a GUI app given a large test suite generated by anautomated GUI testing tool. We next give a brief overview of ourtechnique using formal notation and a series of examples.
Problem statement.Given a set of replayable tracesTs, the goalis to find a minimal set of tracesT0such thatT0is replayable,T0consists of transitions from the traces inTs,C(Ts)=C(T0), andthe cost ofT0is minimal. Unfortunately, finding a minimalT0isintractable for the following reasons. First, without the replayabilityrequirement, the problem can be reduced to an instance of the prize-collecting traveling salesman problem (PCTSP), a well-known NP-hard problem . With the replayability requirement, a solutionfound by solving the corresponding PCTSP problem may includenon-replayable traces. Therefore, we need to solve multiple PCTSPproblems until finding a replayable solution. Instead of solving theproblem of finding the global minimum, we developed a two-phaseheuristic algorithm, which we found to work effectively in practice.
imitations of Existing ApproachesIn any test-case reduction technique, we need to construct newtraces. Although the creation of a trace takes little time, we have toensure that the trace can be replayed. It is impossible to precisely de-termine if a trace is replayable. In our technique, we check if a traceis replayable by executing it few times. We found experimentallythat if a trace is non-replayable, it will fail to replay within eightexecutions with very high probability. Faithfully executing a singletransition in a trace could take a few seconds because after inject-ing an input or action, we need to wait until the screen stabilizes.Therefore, executing a trace composed of several transitions couldtake several minutes. Moreover, after executing each trace we needto perform a clean restart, which takes several seconds. Therefore,it is generally time consuming to check if a trace is replayable. Thisis the key bottleneck faced by a GUI test suite reduction technique.
Existing test minimization techniques, such as delta-debugging  and genetic algorithms , will create andcheck the replayability of many traces. https://codeshoppy.com/android-app-ideas-for-students-college-project.html Therefore, these techniquescannot scale when the initial set of traces is large. But all existingautomated techniques for GUI test generation create large numbersof traces. According to Clapp et al. ’s experimental results, theirvariant of delta-debugging can take a few hours to several tens ofhours to handle traces composed of only 500 transitions. In ourexperiments, we had to handle test cases having 10,000 transitions.If we linearly extrapolate the timings reported by Clapp et al. to10,000 transitions, delta-debugging could potentially take a month.We seek a technique that can minimize a test suite in a day or less.