Basic block coverage for search-based unit testing and crash reproduction

Pouria Derakhshanfar, Xavier Devroey, Andy Zaidman

Résultats de recherche: Contribution à un journal/une revueArticleRevue par des pairs

57 Téléchargements (Pure)

Résumé

Search-based techniques have been widely used for white-box test generation. Many of these approaches rely on the approach level and branch distance heuristics to guide the search process and generate test cases with high line and branch coverage. Despite the positive results achieved by these two heuristics, they only use the information related to the coverage of explicit branches (e.g., indicated by conditional and loop statements), but ignore potential implicit branchings within basic blocks of code. If such implicit branching happens at runtime (e.g., if an exception is thrown in a branchless-method), the existing fitness functions cannot guide the search process. To address this issue, we introduce a new secondary objective, called Basic Block Coverage (BBC), which takes into account the coverage level of relevant basic blocks in the control flow graph. We evaluated the impact of BBC on search-based unit test generation (using the DynaMOSA algorithm) and search-based crash reproduction (using the STDistance and WeightedSum fitness functions). Our results show that for unit test generation, BBC improves the branch coverage of the generated tests. Although small (∼ 1.5%), this improvement in the branch coverage is systematic and leads to an increase of the output domain coverage and implicit runtime exception coverage, and of the diversity of runtime states. In terms of crash reproduction, in the combination of STDistance and WeightedSum, BBC helps in reproducing 3 new crashes for each fitness function. BBC significantly decreases the time required to reproduce 43.5% and 45.1% of the crashes using STDistance and WeightedSum, respectively. For these crashes, BBC reduces the consumed time by 71.7% (for STDistance) and 68.7% (for WeightedSum) on average.

langue originaleAnglais
Numéro d'article192
journalEmpirical Software Engineering
Volume27
Numéro de publication7
Les DOIs
Etat de la publicationPublié - 6 oct. 2022

Empreinte digitale

Examiner les sujets de recherche de « Basic block coverage for search-based unit testing and crash reproduction ». Ensemble, ils forment une empreinte digitale unique.
  • Basic Block Coverage for Unit Test Generation at the SBST 2022 Tool Competition

    Derakhshanfar, P. & Devroey, X., 9 mai 2022, Proceedings - 15th Search-Based Software Testing Workshop, SBST 2022. ACM Press, p. 37-38 2 p. (Proceedings - 15th Search-Based Software Testing Workshop, SBST 2022).

    Résultats de recherche: Contribution dans un livre/un catalogue/un rapport/dans les actes d'une conférenceArticle dans les actes d'une conférence/un colloque

    Accès ouvert
    File
    92 Téléchargements (Pure)
  • It Is Not Only About Control Dependent Nodes: Basic Block Coverage for Search-Based Crash Reproduction

    Derakhshanfar, P., Devroey, X. & Zaidman, A., 2020, Search-Based Software Engineering - 12th International Symposium, SSBSE 2020, Proceedings. Aleti, A. & Panichella, A. (eds.). Springer Science and Business Media Deutschland GmbH, p. 42-57 16 p. (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol 12420 LNCS).

    Résultats de recherche: Contribution dans un livre/un catalogue/un rapport/dans les actes d'une conférenceArticle dans les actes d'une conférence/un colloque

Contient cette citation