Prioritizing test cases for early detection of refactoring faults. (21st March 2016) - Alves, Everton L. G.; Machado, Patrícia D. L.; Massoni, Tiago; Kim, Miryung
Summary: Refactoring edits are error‐prone, requiring cost‐effective testing. Regression test suites are often used as a safety net for decreasing the chances of behavioural changes. Because of the high costs related to handling massive test suites, prioritization techniques can be applied to reorder test case execution, fostering early fault detection. However, traditional prioritization techniques are not specifically designed for detecting refactoring‐related faults. This article proposes refactoring‐based approach (RBA), a refactoring‐aware strategy for prioritizing regression test cases. RBA reorders an existing test sequence, using a set of proposed refactoring fault models that define the refactoring's impact on program methods. Refactoring‐based approach's evaluation shows that it promotes early detection of refactoring faults and outperforms well‐known prioritization techniques in 71% of the cases. Moreover, it prioritizes fault‐revealing test cases close to one another in 73% of the cases, which can be useful for fault localization. Those findings show that RBA can considerably improve prioritization of test cases during perfective evolution, both by increasing fault‐detection rates as well as by helping to pinpoint defects introduced by an incorrect refactoring. Copyright © 2016 John Wiley & Sons, Ltd. Abstract : This article's main contributions are as follows: A test case prioritization technique (RBA) centred on detecting refactoring edits faults earlier. An evaluation of the technique by means of two empirical studies. The studies provide statistical evidence that RBA fosters early detection of refactoring‐related behavioural changes. A new metric for evaluating how spread is the fault‐revealing test cases throughout a prioritized test sequence.