一句话:提出 DeBBI,利用客户端项目测试套件与信息检索优先化,跨项目检测库的行为向后不兼容。
库版本升级常导致库与客户端项目之间出现行为向后不兼容(BBI),而库自身的回归测试往往无法检测全部 BBI。本文提出 DeBBI,通过跨项目测试与分析来检测 BBI:使用多个客户端项目的测试套件,并将跨项目 BBI 检测转化为信息检索问题,从而优先执行更可能暴露 BBI 的客户端项目;进一步引入项目多样性和测试相关性以加速检测。实验表明,在 JDK 上相比朴素跨项目 BBI 检测,DeBBI 将检测首个和平均唯一 BBI 的端到端测试时间分别降低 99.1% 和 70.8%,并已应用于其他流行第三方库;目前共检测到 97 个 BBI 缺陷,其中 19 个已确认为先前未知缺陷。
In modern software development, software libraries play a crucial role in reducing software development effort and improving software quality. However, at the same time, the asynchronous upgrades of software libraries and client software projects often result in incompatibilities between different versions of libraries and client projects. When libraries evolve, it is often very challenging for library developers to maintain the so-called backward compatibility and keep all their external behavior untouched, and behavioral backward incompatibilities (BBIs) may occur. In practice, the regression test suites of library projects often fail to detect all BBIs. Therefore, in this paper, we propose DeBBI to detect BBIs via cross-project testing and analysis, i.e., using the test suites of various client projects to detect library BBIs. Since executing all the possible client projects can be extremely time consuming, DeBBI transforms the problem of cross-project BBI detection into a traditional information retrieval (IR) problem to execute the client projects with higher probability to detect BBIs earlier. Furthermore, DeBBI considers project diversity and test relevance information for even faster BBI detection. The experimental results show that DeBBI can reduce the end-to-end testing time for detecting the first and average unique BBIs by 99.1% and 70.8% for JDK compared to naive cross-project BBI detection. Also, DeBBI has been applied to other popular 3rd-party libraries. To date, DeBBI has detected 97 BBI bugs with 19 already confirmed as previously unknown bugs.
DOI 原文 ·
@inproceedings{paperbot5639,
title = {Taming behavioral backward incompatibilities via cross-project testing and analysis},
author = {Lingchao Chen and Foyzul Hassan and Xiaoyin Wang and Lingming Zhang},
booktitle = {ICSE},
year = {2020},
doi = {10.1145/3377811.3380436}
}