一句话:提出 PExReport-Maven,在 Maven 构建系统中自动裁剪源码、依赖与环境,生成精简可执行的跨项目失败复现报告。
现代 Java 开发依赖大量第三方库,测试执行轨迹常跨越依赖边界,形成跨项目失败(CPF)。这类失败难以向依赖维护者清晰报告:完整项目不可行,片段又无法复现。PExReport-Maven 在 Maven 构建系统中自动生成精简的独立可执行 CPF 复现包,通过裁剪源代码、依赖和构建环境,仅保留复现失败所需的部分。该包包含源码、依赖及构建环境,可直接执行并复现失败,从而成为理想的 CPF 报告。作者在 74 个软件项目问题的 198 个跨项目失败上评估,成功为 184 个失败生成精简复现包,Java 类数量平均减少 72.97%。工具已开源。
Modern Java software development extensively depends on existing libraries written by other developer teams from the same or a different organization. When a developer executes the test, the execution trace may go across the boundaries of multiple dependencies and create cross-project failures (CPFs). A readable, executable, and concise CPF report may enable the most effective communication, but creating such a report is often challenging in Java ecosystems. We developed PExReport-Maven to automatically create the ideal CPF reports in the Maven build system. PExReport-Maven leverages the Maven build system to prune source code, dependencies, and the build environment to create a concise stand-alone executable CPF reproduction package from the original CPF project. The reproduction package includes the source code, dependencies, and build environment necessary to reproduce the CPF, making it an ideal CPF report. We performed an evaluation on 74 software project issues with 198 cross-project failures, and the evaluation results show that PExReport can create pruned reproduction packages for 184 out of the 198 test failures in our dataset, with an average reduction of 72.97% in Java classes. A future study will be conducted based on user feedback from using this tool to report real-world CPFs. PExReport-Maven is publicly available at https://github.com/wereHuang/PExReport-Maven. The tool demo is available on the PExReport website: https://sites.google.com/view/pexreport/home.