A Fitness Function for Search-based Testing of Java Classes, which is Based on the States Reached by the Object under Test

α
Ina Papadhopulli
Ina Papadhopulli
σ
Elinda Mece
Elinda Mece
α Polytechnic University of Tirana Polytechnic University of Tirana

Send Message

To: Author

A Fitness Function for Search-based Testing of Java Classes, which is Based on the States Reached by the Object under Test

Article Fingerprint

ReserarchID

CSTSDEREUVN

A Fitness Function for Search-based Testing of Java Classes, which is Based on the States Reached by the Object under Test Banner

AI TAKEAWAY

Connecting with the Eternal Ground
  • English
  • Afrikaans
  • Albanian
  • Amharic
  • Arabic
  • Armenian
  • Azerbaijani
  • Basque
  • Belarusian
  • Bengali
  • Bosnian
  • Bulgarian
  • Catalan
  • Cebuano
  • Chichewa
  • Chinese (Simplified)
  • Chinese (Traditional)
  • Corsican
  • Croatian
  • Czech
  • Danish
  • Dutch
  • Esperanto
  • Estonian
  • Filipino
  • Finnish
  • French
  • Frisian
  • Galician
  • Georgian
  • German
  • Greek
  • Gujarati
  • Haitian Creole
  • Hausa
  • Hawaiian
  • Hebrew
  • Hindi
  • Hmong
  • Hungarian
  • Icelandic
  • Igbo
  • Indonesian
  • Irish
  • Italian
  • Japanese
  • Javanese
  • Kannada
  • Kazakh
  • Khmer
  • Korean
  • Kurdish (Kurmanji)
  • Kyrgyz
  • Lao
  • Latin
  • Latvian
  • Lithuanian
  • Luxembourgish
  • Macedonian
  • Malagasy
  • Malay
  • Malayalam
  • Maltese
  • Maori
  • Marathi
  • Mongolian
  • Myanmar (Burmese)
  • Nepali
  • Norwegian
  • Pashto
  • Persian
  • Polish
  • Portuguese
  • Punjabi
  • Romanian
  • Russian
  • Samoan
  • Scots Gaelic
  • Serbian
  • Sesotho
  • Shona
  • Sindhi
  • Sinhala
  • Slovak
  • Slovenian
  • Somali
  • Spanish
  • Sundanese
  • Swahili
  • Swedish
  • Tajik
  • Tamil
  • Telugu
  • Thai
  • Turkish
  • Ukrainian
  • Urdu
  • Uzbek
  • Vietnamese
  • Welsh
  • Xhosa
  • Yiddish
  • Yoruba
  • Zulu

Abstract

Genetic Algorithms are among the most efficient search-based techniques to automatically generate unit test cases today. The search is guided by a fitness function which evaluates how close an individual is to satisfy a given coverage goal. There exists several coverage criteria but the default criterion today is branch coverage. Nevertheless achieving high or full branch coverage does not imply that the generated test suite has good quality. In object oriented programs the state of the object affects its behavior. Thereupon, test cases that put the object under test, in new states are of interest in the testing context. In this article we propose a new fitness function which takes into consideration three factors for evaluation: the approach level, the branch distance and the new states reached by a test case. The coverage targets are still the branches, but during the search, the state of the object under test evolves with the scope to produce individuals that discover interesting features of the class and as a consequence can discover errors. We implemented this fitness function in the eToc tool. In our experiments the usage of the proposed fitness function towards the original fitness function results in a relative increase of 15.6% in the achieved average mutation score with the cost of a relative increase of 12.6% in the average test suite size.

References

31 Cites in Article
  1. (1994). NIST industrial impacts.
  2. Y Cheon,G Leavens (2001). A simple and practical approach to unit testing: The JML and JUnit way.
  3. C Cadar,K Sen (2013). Symbolic Execution for Software Testing: Three Decades Later.
  4. Carlos Pacheco,Shuvendu Lahiri,Michael Ernst,Thomas Ball (2007). Feedback-Directed Random Test Generation.
  5. G Fraser,A Arcuri (2015). EvoSuite at the SBST 2015 Tool Competition.
  6. T Tsuji,A Akinyele (2007). Evaluation of AgitarOne.
  7. G Fraser,P Mcminn,A Arcuri,M Staats (2015). Does Automated Unit Test Generation Really Help Software Testers? A Controlled Empirical Study.
  8. S Shamshiri,R Just,J Rojas,G Fraser,P Mcminn,A Arcuri (2015). Do Automatically Generated Unit Tests Find Real Faults? An Empirical Study of Effectiveness and Challenges.
  9. F Gross,G Fraser,A Zeller (2012). Search-based system testing: high coverage, no false alarms.
  10. P Mcminn (2004). Search-based Software Test Data Generation: A Survey.
  11. Kiran Lakhotia,Phil Mcminn,Mark Harman (2010). An empirical investigation into branch coverage for C programs using CUTE and AUSTIN.
  12. M Mirazz (2010). Evolutionary Testing of Stateful Systems: a Holistic Approach.
  13. Gordon Fraser,Andreas Zeller (2012). Mutation-Driven Generation of Unit Tests and Oracles.
  14. P Tonella (2013). Search-Based Test Case Generation.
  15. G Fraser,A Arcuri (2014). Achieving Scalable Mutationbased Generation of Whole Test Suites.
  16. E Papadhopulli,Meçe (2015). Coverage Criteria for Search Based Automatic Unit Testing of Java Programs.
  17. J Rojas,J Campos1,M Vivanti,G Fraser,A Arcuri (2011). Combining Multiple Coverage Criteria in Search-Based Unit Test Generation.
  18. K Lakhotia,M Harman,H Gross (2010). AUSTIN: A Tool for Search Based Software Testing for the C Language and Its Evaluation on Deployed Automotive Systems.
  19. Nigel Tracey,John Clark,John Mcdermid,Keith Mander (2000). A Search-Based Automated Test-Data Generation Framework for Safety-Critical Systems.
  20. Joachim Wegener,Andre Baresel,Harmen Sthamer (2001). Evolutionary test environment for automatic structural testing.
  21. Arcuri (2010). It Does Matter How You Normalise the Branch Distance in Search Based Software Testing.
  22. P Tonella (2004). Evolutionary Testing of Classes.
  23. Rountev (2004). Precise identification of side-effect-free methods in java.
  24. M Salcianu,Rinard (2005). Purity and side effect analysis for java programs.
  25. L Aleti,Grunske (2014). Test Data Generation with a Kalman Filter-Based Adaptive Genetic Algorithm.
  26. E Eiben,S Smit (2011). Parameter tuning for configuring and analyzing evolutionary algorithms.
  27. Y Ma,J Ouffut (2014). Description of Class Mutation Mutation Operators for Java.
  28. Duc Le,Mohammad Alipour,Rahul Gopinath,Alex Groce (2014). MuCheck: an extensible tool for mutation testing of haskell programs.
  29. Gordon Fraser,Andrea Arcuri (2013). Handling test length bloat.
  30. Valentin Dallmeier,Christian Lindig,Andrzej Wasylkowski,Andreas Zeller (2006). Mining object behavior with ADABU.
  31. N Papadhopulli,Frasheri (2015). Today's Challenges of Symbolic Execution and Search-Based for Automated Structural Testing.

Funding

No external funding was declared for this work.

Conflict of Interest

The authors declare no conflict of interest.

Ethical Approval

No ethics committee approval was required for this article type.

Data Availability

Not applicable for this article.

How to Cite This Article

Ina Papadhopulli. 2016. \u201cA Fitness Function for Search-based Testing of Java Classes, which is Based on the States Reached by the Object under Test\u201d. Global Journal of Computer Science and Technology - C: Software & Data Engineering GJCST-C Volume 16 (GJCST Volume 16 Issue C2): .

Download Citation

Journal Specifications

Crossref Journal DOI 10.17406/gjcst

Print ISSN 0975-4350

e-ISSN 0975-4172

Keywords
Classification
GJCST-C Classification: D.1.1, D.1
Version of record

v1.2

Issue date

May 31, 2016

Language
en
Experiance in AR

Explore published articles in an immersive Augmented Reality environment. Our platform converts research papers into interactive 3D books, allowing readers to view and interact with content using AR and VR compatible devices.

Read in 3D

Your published article is automatically converted into a realistic 3D book. Flip through pages and read research papers in a more engaging and interactive format.

Article Matrices
Total Views: 7720
Total Downloads: 2018
2026 Trends
Related Research

Published Article

Genetic Algorithms are among the most efficient search-based techniques to automatically generate unit test cases today. The search is guided by a fitness function which evaluates how close an individual is to satisfy a given coverage goal. There exists several coverage criteria but the default criterion today is branch coverage. Nevertheless achieving high or full branch coverage does not imply that the generated test suite has good quality. In object oriented programs the state of the object affects its behavior. Thereupon, test cases that put the object under test, in new states are of interest in the testing context. In this article we propose a new fitness function which takes into consideration three factors for evaluation: the approach level, the branch distance and the new states reached by a test case. The coverage targets are still the branches, but during the search, the state of the object under test evolves with the scope to produce individuals that discover interesting features of the class and as a consequence can discover errors. We implemented this fitness function in the eToc tool. In our experiments the usage of the proposed fitness function towards the original fitness function results in a relative increase of 15.6% in the achieved average mutation score with the cost of a relative increase of 12.6% in the average test suite size.

Our website is actively being updated, and changes may occur frequently. Please clear your browser cache if needed. For feedback or error reporting, please email [email protected]

Request Access

Please fill out the form below to request access to this research paper. Your request will be reviewed by the editorial or author team.
X

Quote and Order Details

Contact Person

Invoice Address

Notes or Comments

This is the heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

High-quality academic research articles on global topics and journals.

A Fitness Function for Search-based Testing of Java Classes, which is Based on the States Reached by the Object under Test

Ina Papadhopulli
Ina Papadhopulli Polytechnic University of Tirana
Elinda Mece
Elinda Mece

Research Journals