TY - GEN
T1 - Does Refactoring Break Tests and to What Extent?
AU - Kashiwa, Yutaro
AU - Shimizu, Kazuki
AU - Lin, Bin
AU - Bavota, Gabriele
AU - Lanza, Michele
AU - Kamei, Yasutaka
AU - Ubayashi, Naoyasu
N1 - Funding Information:
We thank Dr. Ishio and his colleagues for developing SELogger and giving us helpful advice. We also gratefully acknowledge the financial support of JSPS and SNSF for the project “SENSOR” (No. 183587, JPJSJRP20191502), and JSPS for the KAKENHI grants (JP21H04877, JP21K17725).
Publisher Copyright:
© 2021 IEEE.
PY - 2021
Y1 - 2021
N2 - Refactoring as a process is aimed at improving the quality of a software system while preserving its external behavior. In practice, refactoring comes in the form of many specific and diverse refactoring operations, which have different scopes and thus a different potential impact on both the production and the test code. We present a large-scale quantitative study complemented by a qualitative analysis involving 615,196 test cases to understand how and to what extent different refactoring operations impact a system's test suites. Our findings show that while the vast majority of refactoring operations do not or very seldom induce test breaks, some specific refactoring types (e.g., 'RENAME Attribute' and 'RENAME Class') have a higher chance of breaking test suites. Meanwhile, 'ADD Parameter' and 'CHANGE Return Type' refactoring operations often require additional lines of changes to fix the test suite they break. While some modern IDEs provide features to automatically apply these two types of refactoring operations, they are not always able to avoid test breaks, thus demanding extra human efforts.
AB - Refactoring as a process is aimed at improving the quality of a software system while preserving its external behavior. In practice, refactoring comes in the form of many specific and diverse refactoring operations, which have different scopes and thus a different potential impact on both the production and the test code. We present a large-scale quantitative study complemented by a qualitative analysis involving 615,196 test cases to understand how and to what extent different refactoring operations impact a system's test suites. Our findings show that while the vast majority of refactoring operations do not or very seldom induce test breaks, some specific refactoring types (e.g., 'RENAME Attribute' and 'RENAME Class') have a higher chance of breaking test suites. Meanwhile, 'ADD Parameter' and 'CHANGE Return Type' refactoring operations often require additional lines of changes to fix the test suite they break. While some modern IDEs provide features to automatically apply these two types of refactoring operations, they are not always able to avoid test breaks, thus demanding extra human efforts.
UR - http://www.scopus.com/inward/record.url?scp=85120938606&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85120938606&partnerID=8YFLogxK
U2 - 10.1109/ICSME52107.2021.00022
DO - 10.1109/ICSME52107.2021.00022
M3 - Conference contribution
AN - SCOPUS:85120938606
T3 - Proceedings - 2021 IEEE International Conference on Software Maintenance and Evolution, ICSME 2021
SP - 171
EP - 182
BT - Proceedings - 2021 IEEE International Conference on Software Maintenance and Evolution, ICSME 2021
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 37th IEEE International Conference on Software Maintenance and Evolution, ICSME 2021
Y2 - 27 September 2021 through 1 October 2021
ER -