paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Chrysalis: A Lightweight Logging and Replay Framework for Metamorphic Testing in Python

Chrysalis:用于 Python 蜕变测试的轻量级日志与重放框架
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 2/10 · 该论文属于软件测试中的蜕变测试框架,目标是提供 Python 日志与重放机制,而非静态分析、形式化验证、浮点或贝叶斯程序分析;其 LLM 案例仅将 LLM 作为被测对象,并非用 LLM/Agent 改进程序分析。引用 0 inbox
Jai Parera, Nathan Huey, Ben Limpanukorn, Miryung Kim
crossref: 2026-09-12

AI 速览

一句话:提出 Chrysalis,一个 Python 轻量级蜕变测试框架,通过日志记录变换历史并支持重放以定位缺陷。

蜕变测试通过输入变换与不变式检验程序行为,但失败后难以复现具体触发路径。Chrysalis 是一个面向 Python 的轻量级、可扩展日志与重放框架,允许开发者定义自定义输入变换及其关联不变式,并组织结构化蜕变测试活动。其核心创新是记录输入上变换历史的轻量日志机制,该紧凑表示既能识别测试失败,也能重放导致缺陷的精确变换序列,从而辅助调试。作者通过两个案例研究展示有效性:审计机器学习模型的公平性,以及评估大语言模型的鲁棒性。框架已开源并提供演示视频。

问题
蜕变测试中,测试失败后难以确定和复现是哪些输入变换及其顺序导致缺陷,尤其多步变换场景缺乏轻量追踪与重放支持。
方法
提出 Chrysalis,一个 Python 可扩展框架,允许定义自定义输入变换和不变式,并用轻量日志记录完整变换历史,支持结构化执行与按精确变换序列重放。
评估
通过两个案例研究评估:审计机器学习模型的公平性,以及评估大语言模型的鲁棒性;同时提供 screencast 和开源实现。
原文摘要(Abstract)

Metamorphic testing (MT) is a powerful technique for software testing. We introduce Chrysalis, a lightweight, extensible logging and replay-based metamorphic testing framework in Python. Chrysalis allows developers to define custom input transformations and their associated invariants, then execute structured metamorphic testing campaigns. Its key innovation is a lightweight logging mechanism that records the full history of transformations applied to an input. This compact representation enables developers to not only identify test failures but also to replay the exact sequence of transformations leading to a bug, facilitating debugging. We demonstrate Chrysalis’s effectiveness through two case studies: auditing a machine learning model for fairness and assessing the robustness of large language models.A screencast demonstrating Chrysalis is available at: https://youtu.be/xJG4qghxlIs, and the source code is available at: https://github.com/Chrysalis-Test/Chrysalis.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9401,
  title = {Chrysalis: A Lightweight Logging and Replay Framework for Metamorphic Testing in Python},
  author = {Jai Parera and Nathan Huey and Ben Limpanukorn and Miryung Kim},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00371}
}