Skip to main content

An Improved Genetic Algorithm With Initial Population Strategy and Guided Mutation

  • Conference paper
  • First Online:
Proceedings of Sixth International Congress on Information and Communication Technology

Part of the book series: Lecture Notes in Networks and Systems ((LNNS,volume 236))

  • 1084 Accesses

Abstract

In testing object-oriented programs (OOP), a fundamental problem of a genetic algorithm (GA) is how to achieve high code coverage for a class under test (CUT), and it is challenging since it requires the search to generate method calls that reach as many different CUT states as possible. This paper introduces a Guided Genetic Algorithm (GGA) that uses static analysis to set the initial population and guide the mutation operator. GGA uses static analysis to generate test cases that focus on only methods of a CUT that help to cover target branches. GGA also uses a seeding strategy for constant values and reference types to increase the likelihood of covering a target branch. We compared GGA with EvoSuite and pure Random Testing (RT) on six Java open-source projects. Our results show that GGA achieved higher branch coverage.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 189.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 249.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Aburas A, Groce A (2014) An improved memetic algorithm with method dependence relations (MAMDR). In: 2014 14th international conference on quality software. IEEE, pp 11–20 (2014)

    Google Scholar 

  2. Baresi L, Lanzi PL, Miraz M (2010) Testful: an evolutionary test approach for java. In: Software testing, verification and validation (ICST). IEEE, pp 185–194 (2010)

    Google Scholar 

  3. Ciupa I, Leitner A, Oriol M, Meyer B (2007) Experimental assessment of random testing for object-oriented software. In: Proceedings of the 2007 international symposium on Software testing and analysis, pp 84–94 (2007)

    Google Scholar 

  4. Fraser G, Arcuri A (2012) The seed is strong: seeding strategies in search-based software testing. In: 2012 IEEE Fifth international conference on software testing, verification and validation. IEEE, pp. 121–130

    Google Scholar 

  5. Fraser G, Arcuri A (2013) Whole test suite generation. IEEE Trans Softw Eng 39(2):276–291

    Article  Google Scholar 

  6. Groce A, Zhang C, Alipour MA, Eide E, Chen Y, Regehr J (2013) Help, help, i’m being suppressed! the significance of suppressors in software testing. In: 2013 IEEE 24th international symposium on software reliability engineering (ISSRE). IEEE, pp 390–399

    Google Scholar 

  7. JaCoCo: Java Code Coverage Library Version 3.1.3. http://www.eclemma.org/jacoco/

  8. Ma L, Artho C, Zhang C, Sato H, Gmeiner J, Ramler R (2015) Grt: program-analysis-guided random testing (t). In: 2015 30th IEEE/ACM international conference on automated software engineering (ASE), pp 212–223

    Google Scholar 

  9. McMinn P (2004) Search-based software test data generation: a survey. Softw Test Verif Reliab 14(2):105–156

    Article  Google Scholar 

  10. Miraz M, Lanzi PL, Baresi L (2010) Improving evolutionary testing by means of efficiency enhancement techniques. In: IEEE congress on evolutionary computation, pp 1–8 (2010)

    Google Scholar 

  11. Sakti A, Pesant,G, Guéhéneuc YG (2015) Instance generator and problem representation to improve object oriented code coverage. IEEE Trans Softw Eng 41(3):294–313

    Google Scholar 

  12. Soot: a Java Optimization Framework Version 2.5.0. https://www.sable.mcgill.ca/soot/

  13. Zhang S, Saff D, Bu Y, Ernst MD (2011) Combined static and dynamic automated test generation. In: Proceedings of the 2011 international symposium on software testing and analysis, pp 353–363

    Google Scholar 

Download references

Acknowledgements

The author would like to thank the two anonymous reviewers for their constructive comments and suggestions. The author would also like to thank the University of Tripoli (Libya) and the SUNY Morrisville (USA) for their support.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ali Aburas .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Aburas, A. (2022). An Improved Genetic Algorithm With Initial Population Strategy and Guided Mutation. In: Yang, XS., Sherratt, S., Dey, N., Joshi, A. (eds) Proceedings of Sixth International Congress on Information and Communication Technology. Lecture Notes in Networks and Systems, vol 236. Springer, Singapore. https://doi.org/10.1007/978-981-16-2380-6_76

Download citation

Publish with us

Policies and ethics