Automated Identification of Uniqueness in JUnit Tests

Author:

Wu Jianwei1ORCID,Clause James1ORCID

Affiliation:

1. University of Delaware, Newark, DE

Abstract

In the context of testing, descriptive test names are desirable because they document the purpose of tests and facilitate comprehension tasks during maintenance. Unfortunately, prior work has shown that tests often do not have descriptive names. To address this limitation, techniques have been developed to automatically generate descriptive names. However, they often generated names that are invalid or do not meet developer approval. To help address these limitations, we present a novel approach to extract the attributes of a given test that make it unique among its siblings. Because such attributes often serve as the basis for descriptive names, identifying them is an important first step towards improving test name generation approaches. To evaluate the approach, we created a prototype implementation for JUnit tests and compared its output with human judgment. The results of the evaluation demonstrate that the attributes identified by the approach are consistent with human judgment and are likely to be useful for future name generation techniques.

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Reference58 articles.

1. Nahla J. Abid, Jonathan I. Maletic, and Bonita Sharif. 2019a. Using developer eye movements to externalize the mental model used in code summarization tasks. In Proceedings of the ACM Symposium on Eye Tracking Research & Applications. ACM, Denver, Colorado,1–9.

2. Nahla J. Abid, Bonita Sharif, Natalia Dragan, Hend Alrasheed, and Jonathan I. Maletic. 2019b. Developer reading behavior while summarizing java methods: Size and context matters. In Proceedings of the IEEE/ACM 41st International Conference on Software Engineering. IEEE, Montréal, Canada, 384–395.

3. Alibaba. 2021. Sentinel: Throttling framework for distributed systems. Retrieved from https://developer.alibabacloud.com/opensource/project/sentinel. Accessed: 2021-10-07.

4. Miltiadis Allamanis, Earl T. Barr, Christian Bird, and Charles Sutton. 2015. Suggesting accurate method and class names. In Proceedings of the Joint Meeting on Foundations of Software Engineering. ACM, Lombardy, Italy, 38–49.

5. Miltiadis Allamanis, Hao Peng, and Charles Sutton. 2016. A convolutional attention network for extreme summarization of source code. In Proceedings of the International Conference on Machine Learning. PMLR, New York, NY,2091–2100.

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3