arrow
Return

Supporting multi-dimensional unit test classification

delete2025-06-19
delete0
PRE
AI
Z
Ziming Wang
Martin P. Robillard cover
Martin P. Robillard (Martin P. Robillard) *
DOI:10.1007/s10664-025-10661-xdelete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
In software development projects, unit test names contribute to the overall quality of the tests. Developers often encode contextual information in the test names to enhance the readability and maintainability of tests. However, this information lacks a formal structure, and thus cannot be systematically used to support software development practices such as documentation and test refactoring. Additionally, large test suites can remain hard to read and maintain, even with descriptive test names. To address these limitations, we propose to identify common types of information encoded in test names using prevalent test naming conventions. We introduce a novel rule-based approach, called Sift4J, to automatically extract latent semantic information encoded in the name of a unit test. Information fragments we can extract from test names include the name of the method under test, a description of the state of the object under test, and the expected result of executing the unit under test. We demonstrate how to perform multi-dimensional classification of unit tests using this information. We evaluate the performance of Sift4J on two samples of unit tests: our development set and a previously-unseen evaluation benchmark. The results show that we can extract sufficient information from test names to assist in meaningfully reorganizing the tests in test classes.
Keywords:
Software testing
Test maintenance
Refactoring
Test structure
Test code refactoring unveiled: where and how does it affect test code quality and effectiveness?
err2024-11-16
err0
PREAI
errMartins, Luana; Pontillo, Valeria; Costa, Heitor; Ferrucci, Filomena; Palomba, Fabio; Machado, Ivan
errShare
errSave
errShare
errSave
The economics of unit testing
err2006-02-18
err30
PREAI
errEllims, M; Bridges, J; Ince, DC
errShare
errSave
Generated Tests in the Context of Maintenance Tasks: A Series of Empirical Studies
err2022-01-01
err3
errOAAI
errHerculano, Wesley B. R.; Alves, Everton L. G.; Mongiovi, Melina
errShare
errSave

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
6.4K

Organization

S
School of Computer Science
Scholars:
0
Papers: 41
Citations: 161
Cited Papers

Cited Papers

errShare
errSave
Investigating the readability of test code
err2024-02-26
err0
errOAAI
errWinkler, Dietmar; Urbanke, Pirmin; Ramler, Rudolf
errShare
errSave
researcher View more