Skip to main content

Advertisement

Log in

A multiple-population genetic algorithm for branch coverage test data generation

  • Published:
Software Quality Journal Aims and scope Submit manuscript

Abstract

The software testing phase in the software development process is considered a time-consuming process. In order to reduce the overall development cost, automatic test data generation techniques based on genetic algorithms have been widely applied. This research explores a new approach for using genetic algorithms as test data generators to execute all the branches in a program. In the literature, existing approaches for test data generation using genetic algorithms are mainly focused on maintaining a single-population of candidate tests, where the computation of the fitness function for a particular target branch is based on the closeness of the input execution path to the control dependency condition of that branch. The new approach utilizes acyclic predicate paths of the program’s control flow graph containing the target branch as goals of separate search processes using distinct island populations. The advantages of the suggested approach is its ability to explore a greater variety of execution paths, and in certain conditions, increasing the search effectiveness. When applied to a collection of programs with a moderate number of branches, it has been shown experimentally that the proposed multiple-population algorithm outperforms the single-population algorithm significantly in terms of the number of executions, execution time, time improvement, and search effectiveness.

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.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15

Similar content being viewed by others

References

  • Alshraideh, M., & Bottaci, L. (2006). Automatic software test data generation for string data using heuristic search with domain specific search operators. Software Testing, Verification and Reliability, 16(3), 175–203.

    Article  Google Scholar 

  • Alshraideh, M., Bottaci, L., & Mahafzah, B. A. (2009). Using program data-state scarcity to guide automatic test data generation, Software Quality Journal (in press).

  • Beizer, B. (1990). Software testing techniques (2nd ed.). New York: van Nostrand Rheinhold.

    Google Scholar 

  • Bottaci, L. (2003). Predicate expression cost functions to guide evolutionary search for test data. In Genetic and Evolutionary Computation Conference (GECCO 2003), July 2003 (pp. 2455–2464).

  • Cantu-Paz, E. (1988). A survey of parallel genetic algorithms, Calculateurs Paralleles. Reseaux et Systems Reportis, 10(2),141–171.

    Google Scholar 

  • Chung, I., & Bieman, J. M. (2008). Generating input data structures for automated program testing. Software Testing, Verification and Reliability, 18(3), 37–57.

    Google Scholar 

  • DeMillo, R., & Offutt, A. (1991). Constraint-based automatic test data generation. IEEE Transactions on Software Engineering, 17(9), 900–909.

    Article  Google Scholar 

  • Ferrante, J., Ottenstein, K., & Warren, J. (1987). The program dependency graph and its use in optimization. ACM Transactions on Programming Languages and Systems, 9(1), 319–349.

    Article  MATH  Google Scholar 

  • Fraser, G., & Wotawa, F. (2008). Using model-checkers to generate and analyze property relevant test-cases. Software Quality Journal, 16(2), 161–183.

    Article  Google Scholar 

  • Gotlieb, A., Botella, B., & Rueher, M. (1998). Automatic test data generation using constraint solving techniques. International Symposium on Software Testing and Analysis, 53–62.

  • Gotlieb, A., Botella, B., & Rueher, M. A. (2000). A clp framework for computing structural test data. In Computational Logic, 399–413.

  • Gupta, N., Mathur, A. P., & Soffa, M. L. (2000). Generating test data for branch coverage. In 15th IEEE international conference automated software engineering, Grenoble, France.

  • Harman, M., Hu, L., Hierons, R., Baresel, A., & Sthamer, H. (2002). Improving evolutionary testing by flag removal. In Proceedings of genetic and evolutionary computation conference, GECCO 2002, July 2002 (pp. 1359–1366).

  • Harman, M., Hu, L., Hierons, R., Wegener, G., Sthamer, H., Baresel, A., et al. (2004). Testability transformation. IEEE Transaction on software Engineering, 30(1), 73–81.

    Article  Google Scholar 

  • Harman, M., Islam, F., Xie, T., & Wappler, S. (2009). Automated test data generation for aspect-oriented programs. In Proceedings of the 8th ACM international conference on aspect-oriented software development (pp. 185–196).

  • Harman, M., & McMinn, P. (2007). A theoretical and empirical analysis of evolutionary testing and hill climbing for structural test data generation. In: Proceedings of the international symposium on software testing and analysis (ISSTA 2007) (pp. 73–83), July 2007. London, UK: ACM Press.

  • Kansomkeat, S., Offutt, J., Abdurazik, A., & Baldini, A. (2008). A comparative evaluation of tests generated from different UML diagrams, SNPD ( pp. 867–872).

  • Korel, B. (1990). Automated software test data generation. IEEE Transactions on Software Engineering, 16(8),870–879.

    Article  Google Scholar 

  • Korel, B. (1996). Assertion-oriented automated test data generation. In Proceedings of the 18th international conference on software engineering (pp. 71–80).

  • Kuo, F. C., Chen, T. Y., Li, H., & Chan, W. K. (2008). Enhancing adaptive random testing for programs with high dimensional input domains or failure-unrelated parameters. Software Quality Journal, 16(3):303–327.

    Article  Google Scholar 

  • McGraw, G., Michael, C., & Schatz, M. (2001). Generating software test data by evolution. IEEE Transactions on Software Engineering, 27(12).

  • McMinn, P. (2004). Search-based software test data generation: A survey. Software Testing, Verification and Reliability, 14(2), 105–156.

    Article  Google Scholar 

  • McMinn, P., Binkley, D., & Harman, M. (2009). Empirical evaluation of a nesting testability transformation for evolutionary testing. ACM Transactions on Software Engineering and Methodology (in press).

  • McMinn, P., Binkley, D., Harman, M., & Tonella, P. (2006). The species per path approach to searchbased test data generation. In Proceedings of the international symposium on software testing and analysis (ISSTA 2006) Portland, ME, USA, July 17–20 2006 (pp. 13–24).

  • Michael, C., McGraw, G., Schatz, M., & Walton, C. (1997). Genetic algorithms for dynamic test data generation: Technical report rstr-003-97-11, RST Corporation, Suite 250, 21515 Ridgetop Circle, Sterling VA 20166.

  • Miller, J., Reformat, M., & Zhang, H. (2006). Automatic test data generation using genetic algorithm and program dependence graphs. Information and Software Technology, 48(7), 586–605.

    Article  Google Scholar 

  • Offutt, J., & Hayes, J. (1996). A semantic model of program faults. In: International symposium on software testing and analysis (ISSTA96), pp. 195–200.

  • Pargas, R., Harrold, M., & Peck, R. (1999). Test-data generation using genetic algorithms. Software Testing, Verification and Reliability, 9(4), 263–282.

    Article  Google Scholar 

  • Tracey, N., Clark, J., & Mander, K. (1998). Automated program flaw finding using simulated annealing. Software Engineering Notes, 23(2), 73–81.

    Article  Google Scholar 

  • Wegener, J., Baresel, A., & Sthamer, H. (2001). Evolutionary test environment for automatic structural testing. Information and Software Technology, 43(14), 41–54.

    Article  Google Scholar 

  • Wegener, J., et al. (1996). Systematic testing of real-time systems. In Proceedings of the 4th European conference on software testing analysis and review (EuroStar 1996), Amsterdam, Netherlands.

  • Wegener, J., Pitschinz, R., & Sthmar, H. (2000). Automated testing of real-time tasks. In Proceedings of the 1st international workshop on automated program analysis, testing and verification, Limerick, Ireland.

  • Whitley, D. (1989). The genitor algorithm and selective pressure: Why rank-based allocation of reproductive trials is best. In Proceedings of the third international conference on genetic algorithms (ICGA-89) (pp. 116–121).

  • Whitley, D. (2001). An overview of evolutionary algorithms: Practical issues and common pitfalls. Information and Software Technology, 43, 817–831.

    Article  Google Scholar 

  • Yoo, S., Harman, M., & Ur, S. (2009). Measuring and improving latency to avoid test suite wear out. In IEEE international conference on software testing, verification, and validation workshops (pp. 101–110).

Download references

Acknowledgments

The authors would like to express their gratitude to the anonymous referees for their valuable comments and suggestions for improving the paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mohammad Alshraideh.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Alshraideh, M., Mahafzah, B.A. & Al-Sharaeh, S. A multiple-population genetic algorithm for branch coverage test data generation. Software Qual J 19, 489–513 (2011). https://doi.org/10.1007/s11219-010-9117-4

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11219-010-9117-4

Keywords

Navigation