skip to main content
article

Evolutionary testing of classes

Published: 01 July 2004 Publication History

Abstract

Object oriented programming promotes reuse of classes in multiple contexts. Thus, a class is designed and implemented with several usage scenarios in mind, some of which possibly open and generic. Correspondingly, the unit testing of classes cannot make too strict assumptions on the actual method invocation sequences, since these vary from application to application.In this paper, a genetic algorithm is exploited to automatically produce test cases for the unit testing of classes in a generic usage scenario. Test cases are described by chromosomes, which include information on which objects to create, which methods to invoke and which values to use as inputs. The proposed algorithm mutates them with the aim of maximizing a given coverage measure. The implementation of the algorithm and its application to classes from the Java standard library are described.

References

[1]
A. Baresel, H. Sthamer, and M. Schmidt. Fitness function design to improve evolutionary structural testing. In Proceedings of the Genetic and Evolutionary Computation Conference, GECCO-2002, New York, USA, July 2002.
[2]
B. Baudry, F. Fleurey, J.-M. Jézéquel, and Y. Le Traon. Genes and bacteria for automatic test cases optimization in the .NET environment. In Proc. of the 13th International Symposium on Software Reliability (ISSRE), pages 195--206, Annapolis, Maryland, USA, November 2002. IEEE Computer Society.
[3]
B. Baudry, V. Le Hanh, J.-M. Jézéquel, and Y. Le Traon. Building trust into OO components using a genetic analogy. In Proc. of the 11th International Symposium on Software Reliability (ISSRE), pages 4--14, San Jose, California, USA, October 2000. IEEE Computer Society.
[4]
C. Boyapati, S. Khurshid, and D. Marinov. Korat: Automated testing based on java predicates. In Proceedings of the ACM International Symposium on Software Testing and Analysis (ISSTA), pages 123--133. ACM Press, July 2002.
[5]
U. Buy, A. Orso, and M. Pezzè. Automated testing of classes. In Proceedings of the International Symposium on Software Testing and Analysis (ISSTA 2000), Portland, OR, USA, August 2000.
[6]
M. D. Ernst, J. Cockrell, W. G. Griswold, and D. Notkin. Dynamically discovering likely program invariants to support program evolution. IEEE Transactions on Software Engineering, 27(2):1--25, 2001.
[7]
R. Ferguson and B. Korel. The chaining approach for software test data generation. ACM Transactions on Software Engineering and Methodology, 5(1):63--86, January 1996.
[8]
M. J. Gallagher and V. L. Narasimhan. ADTEST: a test data generation suite for ada software systems. IEEE Transactions on Software Engineering, 23(8):473--484, 1997.
[9]
N. Gupta, A. Mathur, and M. L. Soffa. Generating test data for branch coverage. In Proc. of 15th IEEE International Conference on Automated Software Engineering (ASE'2000), Grenoble, France, September 2000. IEEE Computer Society.
[10]
N. Gupta, A. P. Mathur, and M. L. Soffa. Automated test data generation using an iterative relaxation method. In Proceedings of the 6th International Symposium on Foundations of Software Engineering (FSE), pages 232--244, Orlando, Florida, USA, November 1998. ACM Press.
[11]
J. Henkel and A. Diwan. Discovering algebraic specifications from java classes. In Proceedings of the 17th European Conference on Object-Oriented Programming (ECOOP), pages 431--456. Springer, July 2003.
[12]
B. Korel. Automated software test data generation. IEEE Transactions on Software Engineering, 16(8):870--879, 1990.
[13]
B. Korel. Automated test data generation for programs with procedures. In Proceedings of the International Symposium on Software Testing and Analysis (ISSTA 1996), pages 209--215. ACM Press, August 1996.
[14]
V. Massol and T. Husted. JUnit in Action. Manning Publications Co., Greenwich, Connecticut, USA, 2003.
[15]
C. C. Michael and G. McGraw. Automated software test data generation for complex programs. In Proc. of IEEE International Conference on Automated Software Engineering (ASE'98), pages 136--146. IEEE Computer Society, 1998.
[16]
R. Pargas, M. J. Harrold, and R. Peck. Test-data generation using genetic algorithms. Journal of Software Testing, Verifications, and Reliability, 9:263--282, September 1999.
[17]
H. Sthamer. The Automatic Generation of Software Test Data Using Genetic Algorithms. PhD thesis, University of Glamorgan, Pontyprid, Wales, Great Britain, 1996.

Cited By

View all
  • (2025)LLM-enhanced evolutionary test generation for untyped languagesAutomated Software Engineering10.1007/s10515-025-00496-732:1Online publication date: 17-Feb-2025
  • (2024)Unit Test Generation using Generative AI : A Comparative Performance Analysis of Autogeneration ToolsProceedings of the 1st International Workshop on Large Language Models for Code10.1145/3643795.3648396(54-61)Online publication date: 20-Apr-2024
  • (2024)From static code analysis to visual models of microservice architectureCluster Computing10.1007/s10586-024-04394-727:4(4145-4170)Online publication date: 24-Apr-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGSOFT Software Engineering Notes
ACM SIGSOFT Software Engineering Notes  Volume 29, Issue 4
July 2004
284 pages
ISSN:0163-5948
DOI:10.1145/1013886
Issue’s Table of Contents
  • cover image ACM Conferences
    ISSTA '04: Proceedings of the 2004 ACM SIGSOFT international symposium on Software testing and analysis
    July 2004
    294 pages
    ISBN:1581138202
    DOI:10.1145/1007512
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 July 2004
Published in SIGSOFT Volume 29, Issue 4

Check for updates

Author Tags

  1. automated test case generation
  2. genetic algorithms
  3. object-oriented testing

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)49
  • Downloads (Last 6 weeks)1
Reflects downloads up to 01 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2025)LLM-enhanced evolutionary test generation for untyped languagesAutomated Software Engineering10.1007/s10515-025-00496-732:1Online publication date: 17-Feb-2025
  • (2024)Unit Test Generation using Generative AI : A Comparative Performance Analysis of Autogeneration ToolsProceedings of the 1st International Workshop on Large Language Models for Code10.1145/3643795.3648396(54-61)Online publication date: 20-Apr-2024
  • (2024)From static code analysis to visual models of microservice architectureCluster Computing10.1007/s10586-024-04394-727:4(4145-4170)Online publication date: 24-Apr-2024
  • (2024)A systematic literature review on software security testing using metaheuristicsAutomated Software Engineering10.1007/s10515-024-00433-031:2Online publication date: 23-May-2024
  • (2023)Seed Selection for Testing Deep Neural NetworksACM Transactions on Software Engineering and Methodology10.1145/360719033:1(1-33)Online publication date: 7-Jul-2023
  • (2023)Searching for Quality: Genetic Algorithms and Metamorphic Testing for Software Engineering MLProceedings of the Genetic and Evolutionary Computation Conference10.1145/3583131.3590379(1490-1498)Online publication date: 15-Jul-2023
  • (2023)Instance Space Analysis of Search-Based Software TestingIEEE Transactions on Software Engineering10.1109/TSE.2022.322833449:4(2642-2660)Online publication date: 1-Apr-2023
  • (2023)Automated testing of an industrial stock market trading platform based on functional specificationScience of Computer Programming10.1016/j.scico.2022.102908225:COnline publication date: 1-Jan-2023
  • (2022)Neuroevolution-Based Generation of Tests and Oracles for GamesProceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering10.1145/3551349.3556939(1-13)Online publication date: 10-Oct-2022
  • (2022)More effective test case generation with multiple tribes of AIProceedings of the ACM/IEEE 44th International Conference on Software Engineering: Companion Proceedings10.1145/3510454.3517066(286-290)Online publication date: 21-May-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media