paperbot · PL 论文追踪

全部论文 待读 收藏

P2 pytest-ranking: A Regression Test Prioritization Tool for Python

pytest-ranking:面向 Python 的回归测试优先级排序工具
FSE Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering2025匹配度 2/10 · 该论文属于软件测试与CI中的回归测试优先级排序工具,与用户关注的静态分析、浮点程序分析、贝叶斯程序分析以及LLM/Agent和程序分析的交叉方向均无直接关系。虽然论文强调工业CI落地与实用工具评估,但研究问题本身不匹配。引用 0 inbox
Runxiang Cheng, Kaiyao Ke, Darko Marinov
crossref: 2026-09-12

AI 速览

一句话:提出并评估了面向 Pytest 的实用回归测试优先级排序工具 pytest-ranking,能在 CI 中更快发现测试失败。

回归测试优先级排序(RTP)旨在通过调整测试执行顺序更快暴露失败,为开发者提供更及时的反馈,已研究近三十年,但实用工具与实际评估仍然零散。本文提出 pytest-ranking,一个面向 Python 及其最流行测试框架 Pytest 的鲁棒 RTP 工具。作者在 GitHub Actions CI 上对 14 个开源 Python 项目的 4,308 次构建进行了评估,考察工具与 Pytest 生态的集成情况、运行时开销以及发现失败的速度。实验表明,该工具能够良好地集成到 Pytest 生态中,运行时开销低,并且相比默认顺序与随机顺序基线能更快地发现测试失败。

问题
回归测试优先级排序虽已研究多年,但面向实际语言与测试框架的可用工具和真实 CI 场景下的评估仍然稀缺,开发者难以直接受益。
方法
实现 pytest-ranking 工具,针对 Python 最流行的测试框架 Pytest 设计,并将其集成到真实项目的 CI 流程中以支持测试排序。
评估
在 GitHub Actions CI 上对 14 个开源 Python 项目的 4,308 次构建进行实验,比较与默认顺序和随机顺序基线在发现失败速度上的差异,并测量运行时开销与生态集成效果。
原文摘要(Abstract)

Regression Test Prioritization (RTP) can find test failures quicker and provide faster feedback to developers to help in debugging. While RTP has been researched for almost three decades, with many research techniques proposed, practical tools and evaluations are sporadic. We present pytest-ranking, a robust tool for Python and its most popular testing framework Pytest. We evaluate our tool on 4,308 builds for 14 open-source Python projects running on the GitHub Actions CI. Our experiments show that our tool integrates well with the Pytest ecosystem, has a low runtime overhead, and finds test failures faster than the default and random order baselines.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot9171,
  title = {pytest-ranking: A Regression Test Prioritization Tool for Python},
  author = {Runxiang Cheng and Kaiyao Ke and Darko Marinov},
  booktitle = {FSE},
  year = {2025},
  doi = {10.1145/3696630.3728587}
}