A Pattern-based Approach to Detect and Improve Non-descriptive Test Names

05/11/2020
by   Jianwei Wu, et al.
0

Unit tests are an important artifact that supports the software development process in several ways. For example, when a test fails, its name can provide the first step towards understanding the purpose of the test. Unfortunately, unit tests often lack descriptive names. In this paper, we propose a new, pattern-based approach that can help developers improve the quality of test names of JUnit tests by making them more descriptive. It does this by detecting non-descriptive test names and in some cases, providing additional information about how the name can be improved. Our approach was assessed using an empirical evaluation on 34352 JUnit tests. The results of the evaluation show that the approach is feasible, accurate, and useful at discriminating descriptive and non-descriptive names with a 95

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/16/2021

Using Grammar Patterns to Interpret Test Method Name Evolution

It is good practice to name test methods such that they are comprehensib...
research
08/24/2023

How are We Detecting Inconsistent Method Names? An Empirical Study from Code Review Perspective

Proper naming of methods can make program code easier to understand, and...
research
05/03/2023

An Ontology Design Pattern for Role-Dependent Names

We present an ontology design pattern for modeling Names as part of Role...
research
09/11/2020

Generating Accurate Assert Statements for Unit Test Cases using Pretrained Transformers

Unit testing represents the foundational basis of the software testing p...
research
03/12/2021

How Developers Choose Names

The names of variables and functions serve as implicit documentation and...
research
02/22/2023

Rename Chains: An Exploratory Study on the Occurrence and Characteristics of Identifiers Undergoing Multiple Renamings

Identifier names play a significant role in program comprehension activi...
research
10/07/2022

Removing Qualified Names in Modular Languages

Although the notion of qualified names is popular in module systems, it ...

Please sign up or login with your details

Forgot password? Click here to reset