A Parallel Genetic Algorithm Based on Spark for Pairwise Test Suite Generation

Pairwise testing is an effective test generation technique that requires all pairs of parameter values to be covered by at least one test case. It has been proven that generating minimum test suite is an NP-complete problem. Genetic algorithms have been used for pairwise test suite generation by researchers. However, it is always a time-consuming process, which leads to significant limitations and obstacles for practical use of genetic algorithms towards large-scale test problems. Parallelism will be an effective way to not only enhance the computation performance but also improve the quality of the solutions. In this paper, we use Spark, a fast and general parallel computing platform, to parallelize the genetic algorithm to tackle the problem. We propose a two-phase parallelization algorithm including fitness evaluation parallelization and genetic operation parallelization. Experimental results show that our algorithm outperforms the sequential genetic algorithm and competes with other approaches in both test suite size and computational performance. As a result, our algorithm is a promising improvement of the genetic algorithm for pairwise test suite generation.

[1]  Hareton K. N. Leung,et al.  A survey of combinatorial testing , 2011, CSUR.

[2]  Yu Lei,et al.  In-parameter-order: a test generation strategy for pairwise testing , 1998, Proceedings Third IEEE International High-Assurance Systems Engineering Symposium (Cat. No.98EX231).

[3]  Rajkumar Buyya,et al.  MRPGA: An Extension of MapReduce for Parallelizing Genetic Algorithms , 2008, 2008 IEEE Fourth International Conference on eScience.

[4]  Myra B. Cohen,et al.  Evaluating improvements to a meta-heuristic search for constrained interaction testing , 2011, Empirical Software Engineering.

[5]  Linda Di Geronimo,et al.  A Parallel Genetic Algorithm Based on Hadoop MapReduce for the Automatic Generation of JUnit Test Suites , 2012, 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation.

[6]  Myra B. Cohen,et al.  Learning Combinatorial Interaction Test Generation Strategies Using Hyperheuristic Search , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[7]  Myra B. Cohen,et al.  Constructing test suites for interaction testing , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[8]  Kamal Z. Zamli,et al.  MC‐MIPOG: A Parallel t‐Way Test Generation Strategy for Multicore Systems , 2010 .

[9]  Filomena Ferrucci,et al.  Towards Migrating Genetic Algorithms for Test Data Generation to the Cloud , 2013 .

[10]  Moataz A. Ahmed,et al.  Pair-wise test coverage using genetic algorithms , 2003, The 2003 Congress on Evolutionary Computation, 2003. CEC '03..

[11]  Tatsuhiro Tsuchiya,et al.  Using artificial life techniques to generate test cases for combinatorial testing , 2004, Proceedings of the 28th Annual International Computer Software and Applications Conference, 2004. COMPSAC 2004..

[12]  Jacques Klein,et al.  Bypassing the Combinatorial Explosion: Using Similarity to Generate and Prioritize T-Wise Test Configurations for Software Product Lines , 2014, IEEE Transactions on Software Engineering.

[13]  Enrique Alba,et al.  A parallel evolutionary algorithm for prioritized pairwise testing of software product lines , 2014, GECCO.

[14]  Kamal Z. Zamli,et al.  Interaction test data generation using Harmony Search Algorithm , 2011, 2011 IEEE Symposium on Industrial Electronics and Applications.

[15]  Sanjay Ghemawat,et al.  MapReduce: Simplified Data Processing on Large Clusters , 2004, OSDI.

[16]  Yoonsik Cheon,et al.  PWiseGen: Generating test cases for pairwise testing using genetic algorithms , 2011, 2011 IEEE International Conference on Computer Science and Automation Engineering.

[17]  A. Jefferson Offutt,et al.  Combination testing strategies: a survey , 2005, Softw. Test. Verification Reliab..

[18]  Alice E. Smith,et al.  Expected Allele Coverage and the Role of Mutation in Genetic Algorithms , 1993, ICGA.

[19]  Yvan Labiche,et al.  An Orchestrated Survey of Available Algorithms and Tools for Combinatorial Testing , 2014, 2014 IEEE 25th International Symposium on Software Reliability Engineering.

[20]  James D. McCaffrey,et al.  An Empirical Study of Pairwise Test Set Generation Using a Genetic Algorithm , 2010, 2010 Seventh International Conference on Information Technology: New Generations.

[21]  Myra B. Cohen,et al.  Designing Test Suites for Software Interactions Testing , 2004 .

[22]  Myra B. Cohen,et al.  Augmenting simulated annealing to build interaction test suites , 2003, 14th International Symposium on Software Reliability Engineering, 2003. ISSRE 2003..

[23]  Michael J. Franklin,et al.  Resilient Distributed Datasets: A Fault-Tolerant Abstraction for In-Memory Cluster Computing , 2012, NSDI.

[24]  Xiang Chen,et al.  Applying Particle Swarm Optimization to Pairwise Testing , 2010, 2010 IEEE 34th Annual Computer Software and Applications Conference.

[25]  Xavier Llorà,et al.  Scaling Genetic Algorithms Using MapReduce , 2009, 2009 Ninth International Conference on Intelligent Systems Design and Applications.

[26]  D. Richard Kuhn,et al.  Software fault interactions and implications for software testing , 2004, IEEE Transactions on Software Engineering.

[27]  Hareton K. N. Leung,et al.  Search Based Combinatorial Testing , 2012, 2012 19th Asia-Pacific Software Engineering Conference.

[28]  Myra B. Cohen,et al.  Efficiency and early fault detection with lower and higher strength combinatorial interaction testing , 2013, ESEC/FSE 2013.

[29]  Enrique Alba,et al.  Parallel Genetic Algorithms , 2011, Studies in Computational Intelligence.