Content area

Abstract

Test utility methods encapsulate reusable test logic, enhancing modularity and maintainability in test suites. They help reduce duplication, simplify maintenance, and promote consistency across codebases. However, their characteristics and usage patterns are largely unexplored. We conduct a large-scale empirical study analyzing test utilities from 20 open-source projects to understand their prevalence, organization, frequency of use, and purposes. We find 84,197 utilities across the projects, averaging one utility for every three test methods in half of the projects. Most utilities are helper methods (88.9%) rather than life-cycle methods, with setup methods encapsulating test initialization (53.3%) and clean-up (30.8%). Notably, 58.4% have public visibility. Most tests (76%) utilize at least one utility, with over half (56%) shared across multiple tests. These findings provide new insights into how developers structure and reuse test logic, providing a basis for improving test organization and maintainability.

Details

1010268
Title
An Empirical Study of Test Utility Methods in Java and Python Projects
Number of pages
44
Publication year
2025
Degree date
2025
School code
0157
Source
MAI 87/6(E), Masters Abstracts International
ISBN
9798265475909
Advisor
Committee member
Kotala, Pratap; Myronovych, Oksana; Pirim, Harun
University/institution
North Dakota State University
Department
Computer Science
University location
United States -- North Dakota
Degree
M.S.
Source type
Dissertation or Thesis
Language
English
Document type
Dissertation/Thesis
Dissertation/thesis number
32285718
ProQuest document ID
3280778616
Document URL
https://www.proquest.com/dissertations-theses/empirical-study-test-utility-methods-java-python/docview/3280778616/se-2?accountid=208611
Copyright
Database copyright ProQuest LLC; ProQuest does not claim copyright in the individual underlying works.
Database
ProQuest One Academic