






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Gordon Fraser Saarland University – Computer Science Saarbr¨ucken, Germany [email protected]
Andrea Arcuri Certus Software V&V Center at Simula Research Laboratory P.O. Box 134, 1325 Lysaker, Norway [email protected]
Abstract—Search-based techniques have been shown useful for the task of generating tests, for example in the case of object-oriented software. But, as for any meta-heuristic search, the efficiency is heavily dependent on many different factors; seeding is one such factor that may strongly influence this efficiency. In this paper, we evaluate new and typical strategies to seed the initial population as well as to seed values introduced during the search when generating tests for object-oriented code. We report the results of a large empirical analysis carried out on 20 Java projects (for a total of 1, public classes). Our experiments show with strong statistical confidence that, even for a testing tool that is already able to achieve high coverage, the use of appropriate seeding strategies can further improve performance.
Keywords-test case generation; search-based testing; testing classes; search-based software engineering
I. INTRODUCTION Search-based techniques have been shown to be a promis- ing approach to tackle many kinds of software engineering tasks [1], particularly software testing [2]. Although auto- mated generation of test cases for structural coverage has received particular attention, for example in the case of object-oriented software (e.g., [3]), such testing techniques are still not widely adopted by practitioners. This is partially due to current limitations in these techniques (e.g., in terms of efficiency and applicability), and because many of the different parameters that influence search-based software testing (SBST) are not well understood. Investigating these techniques is therefore of practical value. In this paper, we consider the aspect of the initial pop- ulation of the search, and present and study a series of techniques to improve search-based test data generation for object-oriented software. The objective of such a search is to automatically generate test suites that maximize branch coverage, while at the same time having the secondary objective of being as small as possible. This is necessary as many types of faults do not lead to crashes (e.g., seg- mentation faults and null pointer exceptions), and so the outcome of the test cases has to be manually verified (e.g., by controlling that the generated assert statements are capturing the intended behavior of the software). In this case, the test suites need to be small enough to be controlled by software engineers in feasible time. However, it is not clear what
influence the seeding of the initial population has on the achievable results, and what are the best seeding strategies. In our empirical analyses on this matter, we focus on the Java language, although the presented techniques can be extended to other languages as well. In particular, we study seeding strategies applied in three different contexts:
All these seeding techniques have been implemented in our automated testing tool EVOSUITE [4]. EVOSUITE is an advanced tool based on a Genetic Algorithm (GA), featuring for example the whole test suite optimization approach to test data generation [5], bloat control techniques [6], testa- bility transformations [7] and effective assertion generation through mutation testing [8]. We evaluated these seeding techniques with a large case study, comprising 20 projects for a total of 1 , 752 public classes and 85 , 503 bytecode level branches, and we followed rigorous statistical procedures to assess the scientific validity of the presented results [9]. The results show that, with high statistical confidence, seeding strategies do improve the performance of the employed SBST technique. However, different strategies do provide different ranges of improve- ment, and in some cases this effect can be correlated with the type of the tested software (e.g., when the class under test makes strong use of string objects). The paper is organized as follows: Section II sets up the context of seeding strategies in SBST, and Section III discusses different seeding strategies when testing object- oriented software. Section IV describes our experiments, and presents and interprets the results. Finally, we discuss threats to validity (Section V) and conclude the paper (Section VI).
In this paper, with seeding we loosely refer to any technique that exploits previous related knowledge to help solve the testing problem at hand. The presence of this previous knowledge should not be a requirement to address the problem at hand (i.e., in theory the problem should be solvable even without using such knowledge). The literature on evolutionary computation contains sev- eral papers on seeding strategies to improve the search. For example, in Genetic Programming, seeding strategies have been used in the context of improving different aspects of programs which the search should optimize. In the context of machine learning, Langdon and Nordin [10] for example studied a seeding strategy in order to improve the ability of a classifier/regressor to generalize. Similarly, White et al. [11] studied several different seeding strategies to initialize a Genetic Programming population for optimizing execution time of a given input program. Having each individual in the initial population being an exact copy of the input program could achieve that the search gets stuck in a sub-optimal area of the search landscape. Therefore, there is the need to use smart seeding strategies to re-use good “building blocks” from the original input program. In the context of search-based software testing (SBST), the most common case of seeding regards the case when testing targets (e.g., branches to cover) are sought one at a time, as for example in [12]. The control dependence graph can be used to choose an order in which the targets are sought, and so reuse input data from previous runs when we seek to cover a dependent target. For example, if several targets are nested inside the same difficult branch, when we generate test data for one of them, we can re-use the result later as starting solution when we seek to cover the other targets, instead of re-starting the search from scratch (which can be expensive considering the difficulty of the parent branch in which they are nested). In the context of testing real-time systems to find worst case execution times, Tlili et al. [13] applied seeding strate- gies as well. Given the execution time of the system under test as the fitness function to optimize, instead of starting from scratch, they used a test case with high coverage as seed to start the search from. In some cases it can be useful to generate more test data, even if coverage for the chosen testing criterion is already maximized. This can be, for example, the case when automated oracles are available, or when software testers can afford to manually evaluate more test cases. Starting from a test case, Yoo and Harman [14] investigated a seeding strategy in which local search is applied on a solution test case, such that the diversity of the test data is maximized while the achieved coverage is not decreased. The rationale is that more different test cases would have more chances to find faults.
McMinn et al. [15] proposed seeding values taken from source code and documentation with the objective to reduce the human oracle costs. Similarly, Fraser and Zeller [16] used common object usage for seeding in the search to reduce the human oracle costs and to improve readability of the generated test cases. A Genetic Algorithm (GA) usually starts from an initial population that is randomly generated. However, domain knowledge can be used to choose this initial population. For example, in test data generation there may be several targets that are not so difficult to cover. So it makes sense to do a first phase of random testing, before using a complex testing technique. For example, Miraz et al. [17] create the initial population by selecting the best individuals out of a larger pool of randomly generated individuals. When testing software with predicates involving strings, generating the right strings for the input data can be very challenging, as the space of possible strings is much larger than, for example, the one of integers. Alshraideh and Bottaci [18] proposed and investigated a seeding technique in which the code of the SUT is analyzed, and then string constants are extracted and used as starting point for generation of string inputs. For example, consider the snippet if(input.equals("complexAndLongString")): covering this branch becomes trivial, as the right input data would be present already in the first generation of the GA. As the seeded strings can be modified during the GA evolution (e.g., through the mutation operator), such seeding technique can be helpful even in more complex cases [18]. Besides extracting string constants from the SUT, a recent seeding approach has been investigated by McMinn et al. [19], in which candidate input strings are extracted from web queries on search engines based on SUT information. Another recent seeding strategy in SBST has been pro- posed by Alshahwan and Harman [20], named “Dynamically Mined Value” seeding. In testing web applications, the resulting HTML pages generated as output of the test cases are then used as source of string inputs for the new test cases in the search.
III. SEEDING STRATEGIES FOR CLASS TESTING When generating tests for object-oriented code, the aim is to produce small sets of tests that maximize the coverage of the underlying code in the classes under test. In this section, we first describe the problem domain in more detail, and then show how different seeding strategies can be applied in this context.
A. Evolutionary Testing of Classes A test suite for a class is a set of test cases, where each test case in turn is a sequence of statements (e.g., a simple JUnit test case). Each statement in a test case can generate objects through constructors and can access fields and methods. The
by hand by the developer of the class. Naturally, such information can be useful to seed the initial population. In the context of testing classes, previous test cases are also sequences of method calls which need to be parsed and interpreted. This might be a non-trivial task, if a developer bases his tests on class hierarchies and interprocedural test calls. Given a set of parsed test cases TP , the question is how to best use this information in the initial population. If TP is small, then using this information too much might lead to the search being stuck in a sub-optimal area of the search landscape. On the other hand, if TP is too large, then it may be difficult to map this to small individual test suites, as desired in evolutionary testing of classes. When generating the initial population for the GA in EVOSUITE, each initial test suite is given n random tests, where n is selected within predefined bounds. When given such a set of parsed test cases TP , each time we produce a new test case, with probability PClone we do not produce it randomly, but clone an existing test case randomly chosen from TP. Then, to increase diversity, we apply a number of mutations to this clone, chosen randomly in the range of [0,NMutation].
IV. EVALUATION
Having defined the different seeding strategies, we now address the following three research questions:
A. Case Study Subjects
For the evaluation, we chose a total of 19 open source libraries and programs. For example, among those there are several widely used libraries developed by Google and the Apache Software Foundation. Furthermore, to analyze in more details some specific types of software, we also used a translation of the String case study subjects employed by Alshraideh and Bottaci [18], and we also used a set of numerical applications from [21]. To avoid a bias caused by considering only open source code, we also selected a subset of an industrial case study project previously used by Arcuri et al. [22]. This results in a total of 3,165 classes, which were tested by only calling the API of the 1,752 public classes (the remaining classes are private and anonymous member classes).
(^1) LOC stands for non-commenting lines of source code, calculated with JavaNCSS (http://javancss.codehaus.org/)
Table I NUMBER OF CLASSES, BRANCHES, AND LINES OF CODE IN THE CASE STUDY SUBJECTS
Case Study #Classes #Branches LOC^1 Public All COL Colt 137 298 10,795 20, CCL Commons CLI 14 15 662 1, CCD Commons Codec 21 22 1,369 2, CCO Commons Collections 246 421 8,683 19, CMA Commons Math 247 306 10,503 23, CPR Commons Primitives 210 231 2,874 7, GCO Google Collections 85 370 4,214 9, ICS Industrial Casestudy 21 29 373 809 JCO Java Collections 30 118 3,531 6, JDO JDom 57 61 4,098 6, JGR JGraphT 137 193 2,467 5, JTI Joda Time 131 199 8,681 18, NXM NanoXML 1 1 310 661 NCS Numerical Casestudy 11 11 209 421 REG Java Regular Expressions 3 91 1,922 3, SCS String Casestudy 12 12 607 606 TRO GNU Trove 206 591 10,585 24, XEN Xmlenc 7 7 1,645 788 XOM XML Object Model 167 185 11,794 23, ZIP Java ZIP Utils 3 4 219 441 Σ 1,752 3,165 85,503 175,
The choice of a case study is of paramount importance for any empirical analysis in software engineering. To ad- dress this problem, in this paper we consider several types of software, as for example container classes, numerical applications, and software with high use of strings and arrays processing. To avoid bias in analyzing the results, we present and discuss the results of our empirical study grouped by project. In fact, different testing techniques can have comparatively different performance on different types of software. For example, random testing has been shown to be very effective in testing container classes [23]. If one only chooses container classes as case study and ignores for example numerical applications, then random testing could be misleadingly advantaged in technique comparisons. In fact, even if one uses several kinds of software in a case study, then it all depends on the proportion of the software types (e.g., if in the case study there are many more container classes than numerical applications). Therefore, aggregated statistics on all the artifacts of a case study need to be interpreted with care, as the proportion of different kinds of software types could lead to misleading results. Unfortunately, how to define a representative case study for test data generation is still an open research question.
B. Experiments We carried out three different sets of experiments, each one addressing one of the three research questions. In all the experiments, we used the default settings of EVOSUITE, where the search is stopped after either executing up to one million statements or a 10 minute timeout. The choice of using the number of statements as stopping
criterion is a common practice in the literature of SBST (and evolutionary computation in general), as it reduces the threats to internal validity regarding the implementation details of the developed research prototypes. This is rea- sonable only under the (usually met) assumption that the cost of the fitness function is “high” compared to the search operators (e.g., crossover and mutation). We also employed a 10 minute timeout for practical reasons. When using a large case study, there might be classes that are highly computational expensive, and this could be hard to detect without specialized tools before running the experiments. Due to the very large number of experiments on this case study, we used this 10 minutes timeout to be sure that all the experiments would be finished within a known time bound. Even so, the experiments took weeks to run even with the use of a cluster of computers. All experiments were repeated 30 times to take the ran- domness of the employed algorithms into account, and the results were analyzed following the guidelines in [9]. When the algorithmic performance of two different algorithms/con- figurations is compared (e.g., which seeding strategy leads to higher branch coverage?), the effect sizes of the comparisons are quantified with the Vargha-Delaney Aˆ 12 statistics. In our context, the Aˆxy is an estimation of the probability that, if we run EVOSUITE with seeding configuration x, we will obtain better coverage than running it with configuration y. When two randomized algorithms are equivalent, then Aˆ 12 = 0. 5. A high value Aˆxy = 1 means that, in all of the 30 runs of EVOSUITE with configuration x, we obtained coverage values higher than the ones obtained in all of the 30 runs with configuration y. Statistical difference has been measured with a two-tailed Mann-Whitney U test. For reason of space, we cannot report all the p-values of the comparisons, so we only highlight the ones that are significant at α = 0. 05 level. In the first set of experiments, we chose five different values for the probability PBytecode for the seeding from bytecode. In particular, PBytecode ∈ { 0 , 0. 2 , 0. 4 , 0. 6 , 0. 8 }, where PBytecode = 0 means no seeding at all (i.e., the default EVOSUITE). Results of these experiments are presented in Table II. Notice that, for reasons of space, we only report the comparison of PBytecode = 0. 2 with PBytecode = 0, as PBytecode = 0. 2 was the configuration that gave best results on average on all the case study. In the second set of experiments, we ran EVOSUITE with the three different seeding strategies for the initialization of the first population. Results are presented in Table III. Notice that, to make the design of the experiments for each research question independent from each other, we used PBytecode =
Table II FOR EACH PROJECT, AVERAGE COVERAGE ON ALL OF ITS CLASSES WHEN NO BYTECODE CONSTANT IS USED (PBYTECODE = 0) AND WHEN THEY ARE USED WITH PROBABILITY PBYTECODE = 0. 2. THE Aˆ 12 OF THESE COMPARISONS ARE CALCULATED BY AGGREGATING ALL RUNS OF ALL CLASSES PER PROJECT (IN BOLD IF STATISTICALLY SIGNIFICANT). ON HIGHER GRANULARITY, IT IS REPORTED THE PERCENTAGE % OF CLASSES FOR WHICH WE HAVE A SIGNIFICANT A^ ˆ 12 > 0. 5 AND Aˆ 12 < 0. 5.
Project P = 0 P = 0. 2 Aˆ 12 % > 0. 5 % < 0. 5 COL 0.74 0.73 0.48 0.04 0. CCL 0.87 0.90 0.56 0.21 0. CCD 0.87 0.88 0.52 0.29 0. CCO 0.91 0.91 0.50 0.02 0. CMA 0.75 0.75 0.51 0.12 0. CPR 0.93 0.94 0.52 0.15 0. GCO 0.74 0.74 0.50 0.04 0. ICS 0.85 0.86 0.50 0.05 0. JCO 0.82 0.82 0.50 0.07 0. JDO 0.73 0.73 0.50 0.12 0. JGR 0.75 0.75 0.50 0.03 0. JTI 0.84 0.85 0.52 0.18 0. NXM 0.59 0.59 0.51 0.00 0. NCS 0.97 0.97 0.51 0.09 0. REG 0.75 0.75 0.50 0.00 0. SCS 0.63 0.85 0.77 0.75 0. TRO 0.88 0.87 0.46 0.005 0. XEN 0.65 0.72 0.57 0.29 0. XOM 0.76 0.77 0.51 0.17 0. ZIP 0.80 0.83 0.69 1.00 0. Average 0.79 0.81 0.53 0.18 0.
default “Random” initialization strategy) on a subset of the case study for which hand-written test cases were avail- able. Not all classes had hand-written test cases, and for some projects our parser was not able to handle their test cases. In particular, our parser currently does not handle inter-procedural test cases (e.g., when one test calls other functions), and it does not yet support Java Generics. This resulted in a total of four projects from which 156 public classes were used for the empirical study (roughly 8 .9% of the entire case study). We considered the combination of possible val- ues for PClone and NMutation, in particular PClone ∈ { 0. 2 , 0. 4 , 0. 6 , 0. 8 } and NMutation ∈ { 0 , 4 , 8 , 16 }. This resulted in 16 configurations for EVOSUITE. We compared the performance of these configurations with the case of no seeding from hand-written test cases, which can be simply represented with PClone = 0. Results of the experiments for these configurations are presented in Table IV and Table V. In Table IV, for each class and configuration, we cal- culated whether Aˆ 12 > 0. 5 or Aˆ 12 < 0. 5 , and if such effect size is statistically significant at level α = 0. 05. Then, for each project, we calculated the difference Dbw among the number b of classes for which we have a significant Aˆ 12 > 0. 5 and the number w of classes for which Aˆ 12 < 0. 5 , and normalize this difference based on the total number z of classes in that project used for the experiment, i.e. Dbw = (b − w)/z. Finally, we average
Table V DETAILS FOR THE BEST CONFIGURATION PCLONE = 0. 8 AND NMUTATION = 4. THE Aˆ 12 ARE IN RESPECT TO THE DEFAULT PCLONE = 0, AND ARE CALCULATED BY AGGREGATING ALL RUNS OF ALL CLASSES PER PROJECT (IN BOLD IF STATISTICALLY SIGNIFICANT). ON HIGHER GRANULARITY, IT IS REPORTED THE PERCENTAGE % OF CLASSES FOR WHICH WE HAVE A SIGNIFICANT Aˆ 12 > 0. 5 AND Aˆ 12 < 0. 5. DETAILS OF THE CASE STUDY ARE PRESENTED AS WELL, AS THE NUMBER OF CLASSES, THE SIZE (MEASURED IN NUMBER OF STATEMENTS) OF THE HAND-WRITTEN TEST SUITES, AND THEIR COVERAGE.
Project # of Classes Coverage for PClone = 0 Seeding Coverage Aˆ 12 % > 0. 5 % < 0. 5 Seeded Test Suites Avg. Size Avg. Coverage CCL 10 0.89 0.96 0.64 0.50 0.40 2032 0. CCD 15 0.92 0.94 0.59 0.47 0.20 52 0. JTI 69 0.90 0.92 0.57 0.54 0.35 776 0. XOM 62 0.71 0.82 0.63 0.48 0.24 2281 0. Average 39 0.86 0.91 0.61 0.50 0.30 1285 0.
the classes, for 4% we obtained worse results. The cases in which we get worse results are concentrated in two projects: COL and TRO. However, in these projects the decrease in average coverage is only 1%. Therefore, in contrast to SCS, we have not seen any case in which seeding has drastic negative effects on performance. Understanding why we get worse results for COL and TRO will be important for future work to design better seeding strategies.
RQ1: Seeding constants from the bytecode improves performance, particularly for classes heavily relying on string objects.
D. Optimizing the Initial Population
In Table III we can see the results of experiments for the “AllMethods” and “Tournament” initialization strategies. In both cases, average coverage increases from 79% to 83% and to 82%, respectively. However, if we look at statistical effect sizes, those are not particular high, i.e., average Aˆ 12 = 0. 509 for AllMethods, and Aˆ 12 = 0. 501 for Tournament. When we look at the number of classes for which there is statistical difference, for Tournament it actually ends up that there are more cases in which this seeding strategy gives worse results (i.e., 2 .8% compared to 0 .8% of classes for which it gives better results). For AllMethods, we have statistically significant better results for 5 .6% of classes compared to 2 .6% in which we get worse results. If we consider projects as a whole, AllMethods gives statistically better results for two projects (CMA and JTI), whereas Tournament decreases performance for one (CMA). The better performance of AllMethods, although small, can be explained as follows: When the class under test has only a few methods, the initial GA population will contain all of them with high probability, so AllMethods will have practical no effect on such type of classes. However, there are cases in which there are many methods in a class, as for example “LocalDateTime” in JTI that has 121 public methods. In EVOSUITE, a random test suite used for the GA first population initialization would have n ∈ [1,10] test cases, each one with length l ∈ [1,50]. On average, a test suite will have (11/2) × (51/2) = 140 method calls
chosen at random, with a maximum of 10 × 50 = 500. These two values (i.e., 140 and 500) might at first glance seem high compared to 121; however, counter-intuitively, the probability of containing at least one direct call to each of the 121 public methods is not high, which can be mathematically proven using the theory of the Coupon Collector’s Problem [24]. On average, to cover all the 121 methods, we would roughly need 121 ×H 121 = 650 method calls (where H is the harmonic number), which is even higher than the maximum 500. By treating n and l as random variables, by using the theory of Coupon Collector’s problem it would be possible to calculate the exact probability that a random test suite contains at least one call to each of the public methods. However, a detailed mathematical analysis of this process is not in the scope of this paper, and we refer the interested reader to [24] for further details.
RQ2: The AllMethods seeding strategy improves performance for classes with a high number of methods.
The not so particularly good performance of Tournament can have several related reasons, which would require a large amount of background material on evolutionary computation to be covered, which unfortunately we cannot include for reasons of space. First, Tournament is computational expen- sive, and it decreases the available budget for the GA search. The motivation behind Tournament is to have an initial population with fit individuals that are somehow diverse. However, when the search landscape has only few deceptive local optima (this does not mean that the search landscape is easy, as many plateaus could be present and monotonically connected toward the global optima, e.g., as in a ladder- like shape [25]), there would be no need to preserve/reward diversity in the population. A random individual that is fitter than the others will dominate the population in few generations, because is has higher chances to be selected for reproduction. The population will quickly converge to very similar and fit individuals, but that would not be a problem if there is no need to escape from deceptive local optima (i.e., in that case it is better to focus on the exploitation rather than the exploration of the search landscape).
Depending on details of the crossover operator, a pre- mature convergence of the population to similar individuals would reduce its effects on the fitness of the offspring and the exploration of the search landscape. For example, crossing over two similar individuals might result in the same genotype with no visible effect on the phenotype, and so the search would be mainly driven by the mutation operator, which would put more focus on the exploitation of the search landscape. On the other hand, a crossover on two different but fit individuals would result in a very different genotype, whose phenotype quality would strongly depend on the effectiveness of the crossover operator to preserve and recombine building blocks. EVOSUITE features the novel approach of evolving whole test suites at the same time, and there is still plenty of opportunities to improve search operators such as crossover. Therefore, future improvements on the crossover operator for test suite evolution would warrant the replication of this study on Tournament in the feature.
RQ2: The Tournament seeding strategy did not improve performance, although its performance might be strongly dependent on the crossover operator.
E. Incorporating Previous Solutions
The data in Table IV show that seeding from hand-written JUnit test cases is highly beneficial for any combination of PClone and NMutation. The data suggest that higher values for PClone are preferable, whereas NMutation does not show a clear trend. The best configuration from Table IV is for PClone = 0. 8 and NMutation = 4. Its performance details are presented in Table V. For all projects, there is strong statistical evidence that seeding provides better results (average Aˆ 12 = 0. 61 , and Aˆ 12 values are statistically significant on each project). However, it is important to notice that in this case, in contrast to the experiments that we ran for the other research questions, there is a human factor involved, i.e., the quality of the hand-written test cases. On one hand, if the test cases are poor, then even the best seeding strategy would likely have little impact on performance. On the other hand, if the hand-written test cases are optimal, then it would be pointless to try to improve upon them. In our case study, the hand-written test cases have lower coverage (average 61%) compared to what can be obtained with EVOSUITE without any seeding (average coverage 86%). If we use seeding, then on average we obtained 91% coverage. This clearly shows the ability of SBST techniques to successfully exploit existing solutions and improve upon them.
RQ3: Seeding from existing hand-written test cases improves performance with high statistical confidence.
F. Search Budget
As discussed earlier, EVOSUITE is stopped after either executing up to one million statements or a 10 minutes timeout. However, the choice of this so called search budget can have large impact on the comparison of algorithms and their variants [26]. If the search budget is very “large”, likely (of course, exceptions exist) all the compared algorithms will solve the problem at hand with “high” probability (where what can be considered “large” and “high” is problem dependent). If the search budget is “low”, then none of the algorithms would solve the problem anyway, and so detecting differences could be difficult. Ideally, one would compare search algorithms based on realistic values for the search budget, which could be derived from how practitioners actually use SBST tools. For exam- ple, a practitioner could run EVOSUITE while he is having a coffee break (e.g., five minutes), while at lunch (e.g., 40 minutes) or let it run on a Friday evening before leaving and collect the results on the next Monday morning (e.g., 66 hours). One could suggest to run the algorithm only with a high search budget (e.g., 60 minutes), and then report performance at each predefined time interval (e.g. every five minutes). This would result in a graph of the performance (Y axis) over time (X axis). It would then be left to the readers and practitioners to decide which search budget applies to their testing contexts (e.g., 10 minutes rather than 30). Unfortunately, this argument would only apply on tools/tech- niques that are not tuned [26]. In fact, the performance of an algorithm is strongly correlated to its parameter settings, and the right tuning of parameters settings is correlated to the search budget [26]. For example, with a low search budget, one would use a smaller population size in GAs (to put more emphasis on the exploitation rather than the exploration of the search landscape) because, even if the search gets stuck in a local optimum, at any rate there would not be much budget left to explore other areas of the search landscape. The choice of the search budget has an impact on the effect sizes we reported in the empirical analyses in this paper. As a clarifying example, in Figure 1 we show the per- formance of EVOSUITE at different search budget intervals for a specific class (all the other classes that we manually investigated resulted in similar graphs). In particular, we consider four different seeding strategies and no seeding. Figure 1 clearly shows that the differences in performance of the seeding strategies are more marked for low budgets, whereas they nearly disappear for higher search budgets. The choice of search budget for the empirical analyses in this paper is based on our previous articles in which we used EVOSUITE, and it was rather arbitrary. However, at the current moment, it is hard to choose which representative budget to use, as usage statistics from practitioners are missing in the literature of SBST.
later phases weaker seeding strategies may catch up. In our experiments, we have considered several seeding strategies, and applied them to the context of testing object- oriented code in terms of the EVOSUITE tool. Further seed- ing strategies are possible, and these as well as investigations of how individual seeding strategies interact will be part of our future work. To learn more about EVOSUITE, visit our Web site: http://www.evosuite.org
Acknowledgments. This project has been funded by Deutsche Forschungsgemeinschaft (DFG), grant Ze509/5-1, and by a Google Focused Research Award on “Test Amplifi- cation”. Andrea Arcuri is funded by the Norwegian Research Council. Thanks go to Yury Pavlov for his contributions to the JUnit parser, and Eva May for comments on an earlier version of this paper.
REFERENCES [1] M. Harman and B. F. Jones, “Search-based software engineer- ing,” Journal of Information & Software Technology, vol. 43, no. 14, pp. 833–839, 2001. [2] P. McMinn, “Search-based software test data generation: A survey,” Software Testing, Verification and Reliability, vol. 14, no. 2, pp. 105–156, 2004. [3] P. Tonella, “Evolutionary testing of classes,” in ACM Int. Symposium on Software Testing and Analysis (ISSTA), 2004, pp. 119–128. [4] G. Fraser and A. Arcuri, “Evosuite: Automatic test suite generation for object-oriented software.” in ACM Symposium on the Foundations of Software Engineering (FSE), 2011. [5] ——, “Evolutionary generation of whole test suites,” in International Conference On Quality Software (QSIC). Los Alamitos, CA, USA: IEEE Computer Society, 2011, pp. 31–
[6] ——, “It is not the length that matters, it is how you control it,” in IEEE International Conference on Software Testing, Verification and Validation (ICST), 2011, pp. 150 – 159. [7] Y. Li and G. Fraser, “Bytecode testability transformation,” in Search Based Software Engineering, ser. Lecture Notes in Computer Science, M. Cohen and M. O’Cinneide, Eds. Springer Berlin / Heidelberg, 2011, vol. 6956, pp. 237–251. [8] G. Fraser and A. Zeller, “Mutation-driven generation of unit tests and oracles,” in ISSTA’10: Proceedings of the ACM International Symposium on Software Testing and Analysis. ACM, 2010, pp. 147–158. [9] A. Arcuri and L. Briand, “A practical guide for using statis- tical tests to assess randomized algorithms in software engi- neering,” in ACM/IEEE International Conference on Software Engineering (ICSE), 2011, pp. 1–10.
[10] W. B. Langdon and P. Nordin, “Seeding genetic programming populations,” in Proceedings of the European Conference on Genetic Programming (EuroGP), 2000, pp. 304–315.
[11] D. White, A. Arcuri, and J. Clark, “Evolutionary improvement of programs,” IEEE Transactions on Evolutionary Computa- tion (TEC), vol. 15, no. 4, pp. 515–538, 2011.
[12] J. Wegener, A. Baresel, and H. Sthamer, “Evolutionary test environment for automatic structural testing,” Information and Software Technology, vol. 43, no. 14, pp. 841–854, 2001. [13] M. Tlili, S. Wappler, and H. Sthamer, “Improving evolution- ary real-time testing,” in Genetic and Evolutionary Compu- tation Conference (GECCO), 2006, pp. 1917–1924. [14] S. Yoo and M. Harman, “Test data regeneration: Gen- erating new test data from existing test data,” Soft- ware Testing, Verification and Reliability (STVR), 2010, http://dx.doi.org/10.1002/stvr.435. [15] P. McMinn, M. Stevenson, and M. Harman, “Reducing qualitative human oracle costs associated with automatically generated test data,” in Proceedings of the First International Workshop on Software Test Output Validation, ser. STOV ’10. New York, NY, USA: ACM, 2010, pp. 1–4. [16] G. Fraser and A. Zeller, “Exploiting common object usage in test case generation,” in ICST 2011: Proceedings of the International Conference on Software Testing, Verification, and Validation. Los Alamitos, CA, USA: IEEE Computer Society, 2011, pp. 80–89. [17] M. Miraz, P. Lanzi, and L. Baresi, “Improving evolutionary testing by means of efficiency enhancement techniques,” in IEEE Congress on Evolutionary Computation (CEC), 2010, pp. 1–8. [18] M. Alshraideh and L. Bottaci, “Search-based software test data generation for string data using program-specific search operators: Research articles,” Software Testing, Verification, and Reliability, vol. 16, no. 3, pp. 175–203, 2006. [19] P. McMinn, M. Shahbaz, and M. Stevenson., “Search-based test input generation for string data types using the results of web queries,” in IEEE International Conference on Software Testing, Verification and Validation (ICST), 2012. [20] N. Alshahwan and M. Harman, “Automated web applica- tion testing using search based software engineering,” in IEEE/ACM Int. Conference on Automated Software Engineer- ing (ASE), 2011, pp. 3–12. [21] A. Arcuri and L. Briand, “Adaptive random testing: An illu- sion of effectiveness?” in ACM Int. Symposium on Software Testing and Analysis (ISSTA), 2011. [22] A. Arcuri, M. Z. Iqbal, and L. Briand, “Black-box system testing of real-time embedded systems using random and search-based testing,” in IFIP International Conference on Testing Software and Systems (ICTSS), 2010, pp. 95–110. [23] R. Sharma, M. Gligoric, A. Arcuri, G. Fraser, and D. Mari- nov, “Testing container classes: Random or systematic?” in Fundamental Approaches to Software Engineering (FASE),
[24] W. Feller, An Introduction to Probability Theory and Its Applications, Vol. 1, 3rd ed. Wiley, 1968. [25] A. Arcuri, “Insight knowledge in search based software test- ing,” in Genetic and Evolutionary Computation Conference (GECCO), 2009, pp. 1649–1656. [26] A. Arcuri and G. Fraser, “On parameter tuning in search based software engineering,” in International Symposium on Search Based Software Engineering (SSBSE), 2011, pp. 33–47.