Skip to main content

Advertisement

Log in

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

  • Regular Paper
  • Published:
Journal of Computer Science and Technology Aims and scope Submit manuscript

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Lei Y, Tai K C. In-parameter-order: A test generation strategy for pairwise testing. In Proc. the 3rd IEEE International High-Assurance Systems Engineering Symposium, Nov. 1998, pp.254-261.

  2. Kuhn D R,Wallace D R, Jr. Gallo A M. Software fault interactions and implications for software testing. IEEE Transactions on Software Engineering, 2004, 30(6): 418–421.

  3. Nie C H, Leung H. A survey of combinatorial testing. ACM Comput. Surv., 2011, 43(2): Article No. 11.

  4. Khalsa S K, Labiche Y. An orchestrated survey of available algorithms and tools for combinatorial testing. In Proc. the 25th International Symposium on Software Reliability Engineering (ISSRE), Nov. 2014, pp.323-334.

  5. Zaharia M, Chowdhury M, Das T, Dave A, Ma J, McCauly M, Franklin M J, Shenker S, Stoica I. Resilient distributed datasets: A fault-tolerant abstraction for in-memory cluster computing. In Proc. the 9th USENIX Conference on Networked Systems Design and Implementation, April 2012, pp.15-28.

  6. Ghazi S A, Ahmed M A. Pair-wise test coverage using genetic algorithms. In Proc. the 2003 Congress on Evolutionary Computation, Dec. 2003, pp.1420-1424.

  7. McCaffrey J D. An empirical study of pairwise test set generation using a genetic algorithm. In Proc. the 7th International Conference on Information Technology: New Generations (ITNG), April 2010, pp.992-997.

  8. Shiba T, Tsuchiya T, Kikuno T. Using artificial life techniques to generate test cases for combinatorial testing. In Proc. the 28th Annual International Computer Software and Applications Conference, Sept. 2004, pp.72-77.

  9. Flores P, Yoonsik C. PWiseGen: Generating test cases for pairwise testing using genetic algorithms. In Proc. IEEE International Conference on Computer Science and Automation Engineering (CSAE), June 2011, pp.747-752.

  10. Nie C H, Wu H Y, Liang Y L, Leung H, Kuo F C, Li Z. Search based combinatorial testing. In Proc. the 19th Asia-Pacific Software Engineering Conference (APSEC), Dec. 2012, pp.778-783.

  11. Cohen M B, Gibbons P B, Mugridge W B, Colbourn C J. Constructing test suites for interaction testing. In Proc. the 25th International Conference on Software Engineering, May 2003, pp.38-48.

  12. Cohen M B, Colbourn C J, Ling A C H. Augmenting simulated annealing to build interaction test suites. In Proc. the 14th International Symposium on Software Reliability Engineering, Nov. 2003, pp.394-405.

  13. Petke J, Yoo S, Cohen M B, Harman M. Efficiency and early fault detection with lower and higher strength combinatorial interaction testing. In Proc. the 9th Joint Meeting on European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC/FSE 2013), August 2013, pp.26-36.

  14. Henard C, Papadakis M, Perrouin G, Klein J, Heymans P, Le Traon Y. Bypassing the combinatorial explosion: Using similarity to generate and prioritize t-wise test configurations for software product lines. IEEE Transactions on Software Engineering, 2014, 40(7): 650–670.

    Article  Google Scholar 

  15. Alsewari A A, Zamli K Z. Interaction test data generation using Harmony Search algorithm. In Proc. IEEE Symposium on Industrial Electronics and Applications (ISIEA), Sept. 2011, pp.559-564.

  16. Li J H, Xing D D, Zhao Y Q. Combinatorial test suite generation of variable strength based on harmony search. Journal of Network & Information Security, 2013, 4(2): 177–188.

    Google Scholar 

  17. Dean J, Ghemawat S. MapReduce: Simplified data processing on large clusters. In Proc. the 6th Symposium on Operating System Design and Implementation (OSDI), Dec. 2004, Article No. 10.

  18. Jin C, Vecchiola C, Buyya R. MRPGA: An extension of MapReduce for parallelizing genetic algorithms. In Proc. the 4th IEEE International Conference on eScience, Dec. 2008, pp.214-221.

  19. Verma A, Llora X, Goldberg D E, Campbell R H. Scaling genetic algorithms using MapReduce. In Proc. the 9th International Conference on Intelligent Systems Design and Applications, Nov. 30-Dec. 2, 2009, pp.13-18.

  20. Geronimo D L, Ferrucci F, Murolo A, Sarro F. A parallel genetic algorithm based on Hadoop MapReduce for the automatic generation of JUnit test suites. In Proc. the 5th IEEE International Conference on Software Testing, Verification and Validation, April 2012, pp.785-793.

  21. Martino D S, Ferrucci F, Maggio V, Sarro F. Towards migrating genetic algorithms for test data generation to the cloud. In Software Testing in the Cloud: Perspectives on an Emerging Discipline, Tilley S, Parveen T (eds.), IGI Global, 2013, pp.113-135.

  22. Younis M, Zamli K. MC-MIPOG: A parallel t-way test generation strategy for multicore systems. ETRI Journal, 2010, 32(1): 73–83.

    Article  Google Scholar 

  23. Lopez-Herrejon R E, Ferrer J, Chicano F, Haslinger E N, Egyed A, Alba E. A parallel evolutionary algorithm for prioritized pairwise testing of software product lines. In Proc. the 16th Genetic and Evolutionary Computation Conference, July 2014, pp.1255-1262.

  24. Grindal M, Offutt J, Andler S F. Combination testing strategies: A survey. Software Testing, Verification, and Reliability, 2005, 15(3): 167–199.

    Article  Google Scholar 

  25. Tate D M, Smith A E. Expected allele coverage and the role of mutation in genetic algorithms. In Proc. the 5th International Conference on Genetic Algorithms, June 1993, pp.31-37.

  26. Luque G, Alba E. Parallel Genetic Algorithms: Theory and Real World Applications. Springer-Verlag Berlin Heidelberg, 2011.

  27. Jia Y, Cohen M B, Harman M, Petke J. Learning combinatorial interaction test generation strategies using hyperheuristic search. In Proc. the 37th International Conference on Software Engineering (ICSE), May 2015, pp.540-550.

  28. Garvin B J, Cohen M B, Dwyer M B. Evaluating improvements to a meta-heuristic search for constrained interaction testing. Empirical Software Engineering, 2011, 16(1): 61–102.

    Article  Google Scholar 

  29. Cohen M B. Designing test suites for software interaction testing [Ph.D. Thesis]. The University of Auckland, 2004.

  30. Chen X, Gu Q, Qi J X, Chen D X. Applying particle swarm optimization to pairwise testing. In Proc. the 34th Annual IEEE Computer Software and Applications Conference, July 2010, pp.107-116.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rong-Zhi Qi.

Additional information

This work is supported by the Fundamental Research Funds for the Central Universities of China under Grant Nos. 2010B06914 and 2013B07514.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Qi, RZ., Wang, ZJ. & Li, SY. A Parallel Genetic Algorithm Based on Spark for Pairwise Test Suite Generation. J. Comput. Sci. Technol. 31, 417–427 (2016). https://doi.org/10.1007/s11390-016-1635-5

Download citation

  • Received:

  • Revised:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11390-016-1635-5

Keywords

Navigation