Font Size: a A A

Measuring The Impact Of Test Smell Removal On Software Code Quality

Posted on:2022-04-23Degree:MasterType:Thesis
Country:ChinaCandidate:H J HuangFull Text:PDF
GTID:2518306476998699Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Test Code Smell is a derivative concept of Code Smell,which comes from the field of Software Testing.Test Code Smell is a symptom of bad design and poor implementation in Software Testing.Good Software Testing can improve the reliability of software,so the design and implementation of test code is one of the hotspots of research by international scholars.At present,the impact of test smell on code quality has been extensively studied,but the impact of test smell on code quality has not been studied from the perspective of test smell refactoring.Therefore,there is a lack of test refactoring operations that can effectively improve code quality,resulting in developers Cannot weigh the pros and cons of refactoring the test smell.To this end,this article analyzes two code quality metrics,namely defect-proneness and change-proneness of code,to study the influence of eliminating test smell on code quality.Our paper quantifies the defect-proneness and change-proneness of the test code and the associated production code before and after the test smell is refactored,and then explores the benefit of the code quality after the test smell is refactored.On this basis,Our paper proposes a method based on SZZ algorithm and relative risk RR to evaluate the impact of refactoring test smell on the defect-proneness of code.And we use the MSR technology to explore the influence of refactoring test smell on the changeproneness of code.The experiment digs out 119 historical versions of 10 open source projects,and calculates the code quality improvement effect after refactoring the test odor operation for 5 kinds of test code smells.Experimental results show that the improvement of code quality through refactoring and testing of smell operations is more obvious.After the test smell is refactored,the risk of changing the test code is reduced by 162%,and the risk of defects is reduced by 138%.After the test smell is refactored,the risk of changing the production code is reduced by 69%.The risk of defects is reduced by 84%.Compared with the other four kinds of test smells,the refactoring " Sensitive Equality " smell improves the quality of the test code significantly.The refactoring of "Eager Test" and " Mystery Guest " smell is more helpful to improve the quality of production code.
Keywords/Search Tags:test code smell, software code quality, test-driven development, automated test, MSR
PDF Full Text Request
Related items