一句话:提出变更感知的 BuildSheriff,将 CI 构建中同一根因导致的测试失败聚类,降低诊断成本。
持续集成中,测试失败是构建失败的最常见原因之一,而逐一诊断所有测试失败代价高昂;由于失败通常由少数底层缺陷引起,按根因对测试失败分诊可显著节省成本。现有失败分诊方法多面向崩溃或缺陷报告,不适用于 CI 测试失败场景。作者先对 163,371 个由测试失败导致的失败构建进行大规模实证研究,刻画真实 Java 项目中的测试失败特征;据此提出变更感知的 BuildSheriff,将每次 CI 构建中的测试失败按同一根因聚类。在 200 个失败构建上的评估表明,BuildSheriff 的分诊效果显著优于现有方法。
Test failures are one of the most common reasons for broken builds in continuous integration. It is expensive to diagnose all test failures in a build. As test failures are usually caused by a few underlying faults, triaging test failures with respect to their underlying root causes can save test failure diagnosis cost. Existing failure triage methods are mostly developed for triaging crash or bug reports, and hence not applicable in the context of test failure triage in continuous integration. In this paper, we first present a large-scale empirical study on 163,371 broken builds caused by test failures to characterize test failures in real-world Java projects. Then, motivated by our study, we propose a new change-aware approach, BuildSheriff, to triage test failures in each continuous integration build such that test failures with the same root cause are put in the same cluster. Our evaluation on 200 broken builds has demonstrated that BuildSheriff can significantly improve the state-of-the-art methods on the triaging effectiveness.