Post-Refactoring Recovery of Unit Tests: An Automated Approach
Dublin Core
Title
Post-Refactoring Recovery of Unit Tests: An Automated Approach
Subject
Unit Tests, GreenRefPlus, Code Refactoring, Automatic Recovery, JUnit, Eclipse Plug-in, Agile eXtreme Programming, Test-Driven Development.
Description
— In application development lifecycle, specifically in test-driven development, refactoring plays a crucial role in sustaining ease. However, in-spite of bringing ease, refactoring does not ensure the desired behaviour of code after it is applied. Because refactoring tends to worsen the alignments between source code and its corresponding units. One significant solution to the aforementioned issue is the technique called unit testing. As unit testing enable the developers to confidently apply refactoring while avoiding undesired code behaviour. Unit testing provides effective preventive measures for avoiding bugs by providing immediate feedback, thus assisting to mitigate the fear of change. In this work, we present a tool called GreenRefPlus which efficiently enables the developers to maintain the veracity of code after the process of refactoring is applied. The proposed tool provides automatic recovery for the unit tests after the code is refactored. In this work, we consider Java as our target programming language and we focus on five various types of refactoring, which include Rename Method, Extract Method, Move Method, Parameter Addition and Parameter Removal. Our experiments indicate that the proposed tool GreenRefPlus enables us to consistently refactor the code and apply unit tests. The results presented in our work reveal that the proposed tool assists developers in saving approximately 43% of the total time required to manually recover from broken unit tests.
Creator
Abdallah Qusef
Murad, Sharefa
Najeh Alsalhi
Eman Shudayfat
Source
International Journal of Interactive Mobile Technologies (iJIM); Vol. 17 No. 08 (2023); pp. 39-58
1865-7923
Publisher
International Association of Online Engineering (IAOE), Vienna, Austria
Date
2023-04-26
Rights
Copyright (c) 2023 Abdallah Qusef , Najeh Alsalhi, Eman Shudayfat
https://creativecommons.org/licenses/by/4.0
Relation
Format
application/pdf
Language
eng
Type
info:eu-repo/semantics/article
info:eu-repo/semantics/publishedVersion
Peer-reviewed Article
Identifier
Citation
Abdallah Qusef et al., Post-Refactoring Recovery of Unit Tests: An Automated Approach, International Association of Online Engineering (IAOE), Vienna, Austria, 2023, accessed November 5, 2024, https://igi.indrastra.com/items/show/2533