2012 · 101 citations · 36 references
ComputingComputer ScienceChange MeasurementQuality EngineeringSoftware EngineeringChange Impact AnalysisSoftware MaintenanceSoftware RefactoringSoftware ReuseSoftware TestingVersion ControlEmpirical EvaluationMetrics For Refactoring ImpactOpen Source Software Quality AssuranceRefactoringRefactoring Impact AnalysisRegression Testing For RefactoringSoftware Quality Measurement
Refactoring is widely regarded as improving software quality and developer productivity, yet it also poses risks of functional regression and higher testing costs. This study examines the impact of refactoring edits on regression testing by assessing whether sufficient tests exist, determining how many tests are relevant, and quantifying the proportion of failure‑inducing changes attributable to refactorings. The authors combine RefFinder’s refactoring reconstruction with FaultTracer’s change‑impact analysis to link refactoring edits to affected changes and tests across Java open‑source projects. Across JMeter, XMLSecurity, and ANT, only 22 % of refactored methods and fields are covered by existing regression tests, 38 % of affected tests are relevant to refactorings despite refactorings comprising only 8 % of atomic changes, and refactorings contribute to nearly half of all failed test cases, underscoring the need for automated test augmentation and selection.
It is widely believed that refactoring improves software quality and developer's productivity by making it easier to maintain and understand software systems. On the other hand, some believe that refactoring has the risk of functionality regression and increased testing cost. This paper investigates the impact of refactoring edits on regression tests using the version history of Java open source projects: (1) Are there adequate regression tests for refactoring in practice? (2) How many of existing regression tests are relevant to refactoring edits and thus need to be re-run for the new version? (3) What proportion of failure-inducing changes are relevant to refactorings? By using a refactoring reconstruction analysis and a change impact analysis in tandem, we investigate the relationship between the types and locations of refactoring edits identified by RefFinder and the affecting changes and affected tests identified by the FaultTracer change impact analysis. The results on three open source projects, JMeter, XMLSecurity, and ANT, show that only 22% of refactored methods and fields are tested by existing regression tests. While refactorings only constitutes 8% of atomic changes, 38% of affected tests are relevant to refactorings. Furthermore, refactorings are involved in almost half of the failed test cases. These results call for new automated regression test augmentation and selection techniques for validating refactoring edits.
36
Refactoring improving the design of existing code
Mauricio A. Saca · 2017 · 2.1K citations
A survey of software refactoring
Tom Mens, Tom Tourwé · IEEE Transactions on Software Engineering · 2004 · 1.2K citations · Full text