EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Toward granular search-based automatic unit test case generation

Fabiano Pecorelli, Giovanni Grano, Fabio Palomba, Harald C. Gall, Andrea De Lucia

Empirical Software Engineering · 2024-07 · 29 (4)

DOI: 10.1007/s10664-024-10451-x ↗

Kurz gefasst

Fachartikel in der Zeitschrift Empirical Software Engineering, online erschienen am 17.05.2024. Verfasst von Fabiano Pecorelli und 4 weiteren Autor:innen. Die Arbeit wurde bisher 10-mal zitiert (Crossref) und nennt 73 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: Università degli Studi di Salerno.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Unit testing verifies the presence of faults in individual software components. Previous research has been targeting the automatic generation of unit tests through the adoption of random or search-based algorithms. Despite their effectiveness, these approaches aim at creating tests by solely optimizing metrics like code coverage, without ensuring that the resulting tests have granularities that would allow them to verify both the behavior of individual production methods and the interaction between methods of the class under test. To address this limitation, we propose a two-step systematic approach to the generation of unit tests: we first force search-based algorithms to create tests that cover individual methods of the production code, hence implementing the so-called intra-method tests ; then, we relax the constraints to enable the creation of intra-class tests that target the interactions among production code methods. The assessment of our approach is conducted through a mixed-method research design that combines statistical analyses with a user study. The key results report that our approach is able to keep the same level of code and mutation coverage while providing test suites that are more structured, more understandable and aligned to the design principles of unit testing.

Förderung

  • Università degli Studi di Salerno

Zitieren

APA

Pecorelli, F., Grano, G., Palomba, F., Gall, H. C., & Lucia, A. D. (2024). Toward granular search-based automatic unit test case generation. Empirical Software Engineering, 29(4). https://doi.org/10.1007/s10664-024-10451-x

Vancouver

Pecorelli F, Grano G, Palomba F, Gall HC, Lucia AD. Toward granular search-based automatic unit test case generation. Empirical Software Engineering. 2024;29(4). doi:10.1007/s10664-024-10451-x

BibTeX
@article{Pecorelli2024,
  author = {Pecorelli, Fabiano and Grano, Giovanni and Palomba, Fabio and Gall, Harald C. and Lucia, Andrea De},
  title = {Toward granular search-based automatic unit test case generation},
  journal = {Empirical Software Engineering},
  year = {2024},
  volume = {29},
  number = {4},
  doi = {10.1007/s10664-024-10451-x}
}
Kostenlos starten →