Back to search

McGill University

Supporting Multi-dimensional Unit Test Classification

Abstract

dc:description.abstract

In software development projects, unit test names contribute to the overall quality of the tests. Developers often encode rich contextual information in the test names to enhance the test readability and maintainability. 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 still be hard to read and maintain, even with descriptive names. To address these limitations, we propose to identify common types of information encoded in test names using prevalent test naming conventions, and 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 extract from test names can include the name of the method under test, a description of the state of the object under test, or the expected result of executing the unit under test. We then demonstrate how to perform multi-dimensional classification of unit tests using this information. Finally, 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

Degree

thesis:*
Name thesis:degree_name
Master of Science
Grantor dc:publisher
McGill University
Year dc:date.issued
2024

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Wang, Ziming
Advisor dc:contributor.advisor
  • Robillard, Martin (Supervisor)

Subjects

dc:subject × 1

Rights

dc:rights
Statement dc:rights
  • All items in eScholarship@McGill are protected by copyright with all rights reserved unless otherwise indicated.
Language dc:language.iso
en

Identifiers

dc:identifier.*
OCLC
1478163087
Dc Identifier Other
hyrax:3x816t25s

Chain of custody

source
Harvested from
McGill University
Base URL
mcgill.scholaris.ca/server/oai/request
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
related terms
citation

Wang, Ziming. Supporting Multi-dimensional Unit Test Classification. McGill University, 2024. https://doi.org/10.82308/23224