%0 Journal Article %A Ruilian Zhao and Shukai Zhang and Yan Wang and Weiwei Wang %D 2024 %J International Journal of Computer and Systems Engineering %B World Academy of Science, Engineering and Technology %I Open Science Index 207, 2024 %T Assertion-Driven Test Repair Based on Priority Criteria %U https://publications.waset.org/pdf/10013549 %V 207 %X Repairing broken test cases is an expensive and challenging task in evolving software systems. Although an automated repair technique with intent-preservation has been proposed, it does not take into account the association between test repairs and assertions, leading a large number of irrelevant candidates and decreasing the repair capability. This paper proposes a assertion-driven test repair approach. Furthermore, a intent-oriented priority criterion is raised to guide the repair candidate generation, making the repairs closer to the intent of the test. In more detail, repair targets are determined through post-dominance relations between assertions and the methods that directly cause compilation errors. Then, test repairs are generated from the target in a bottom-up way, guided by the the intent-oriented priority criteria. Finally, the generated repair candidates are prioritized to match the original test intent. The approach is implemented and evaluated on the benchmark of 4 open-source programs and 91 broken test cases. The result shows that the approach can fix 89% (81/91) broken test cases, which are more effective than the existing intent-preserved test repair approach, and our intent-oriented priority criteria work well. %P 133 - 142