Mutation testing is an effective technique for assessing the effectiveness of test suites by systematically injecting artificial faults into programs. However, existing mutation testing techniques fall short in capturing many types of common faults in dynamically typed languages like Python. In this paper, we introduce a novel set of seven mutation operators that are inspired by prevalent anti-patterns in Python programs, designed to complement the existing general-purpose operators and broaden the spectrum of simulated faults. We propose a mutation testing technique that utilizes a hybrid of static and dynamic analyses to mutate Python programs based on these operators while minimizing equivalent mutants. We implement our approach in a tool called PyTation and evaluate it on 13 open-source Python applications. Our results show that PyTation generates mutants that complement those from general-purpose tools, exhibiting distinct behaviour under test execution and uncovering inadequacies in high-coverage test suites. We further demonstrate that PyTation produces a high proportion of unique mutants, a low cross-kill rate, and a low test overlap ratio relative to baseline tools, highlighting its novel fault model. PyTation also incurs few equivalent mutants, aided by dynamic analysis heuristics.


翻译:变异测试是一种通过系统地向程序中注入人工故障来评估测试套件有效性的有效技术。然而,现有的变异测试技术在捕获像Python这样的动态类型语言中的许多常见故障类型方面存在不足。本文中,我们引入了一套新颖的七种变异算子,其灵感来源于Python程序中普遍存在的反模式,旨在补充现有的通用算子并拓宽模拟故障的频谱。我们提出了一种变异测试技术,该技术利用静态和动态分析的混合,基于这些算子对Python程序进行变异,同时最小化等价变异体。我们在一个名为PyTation的工具中实现了我们的方法,并在13个开源Python应用程序上对其进行了评估。我们的结果表明,PyTation生成的变异体补充了通用工具生成的变异体,在测试执行下表现出不同的行为,并揭示了高覆盖率测试套件中的不足。我们进一步证明,相对于基线工具,PyTation产生了高比例的独特变异体、低的交叉杀死率和低的测试重叠率,突显了其新颖的故障模型。在动态分析启发式方法的辅助下,PyTation也产生了很少的等价变异体。

0
下载
关闭预览

相关内容

【新书】异常检测 Python,562页pdf
专知会员服务
44+阅读 · 2024年12月27日
基于深度学习的视频异常检测:综述
专知会员服务
26+阅读 · 2024年9月10日
《基于高斯混合流和入包的异常检测》2023最新57页论文
专知会员服务
28+阅读 · 2023年5月15日
专知会员服务
34+阅读 · 2021年9月16日
【WSDM2021-Ttutorial】深度学习异常检测,111页ppt
专知会员服务
154+阅读 · 2021年3月10日
异常检测(Anomaly Detection)综述
极市平台
20+阅读 · 2020年10月24日
异常检测论文大列表:方法、应用、综述
专知
126+阅读 · 2019年7月15日
一个牛逼的 Python 调试工具
机器学习算法与Python学习
15+阅读 · 2019年4月30日
动手写机器学习算法:异常检测 Anomaly Detection
七月在线实验室
11+阅读 · 2017年12月8日
基于机器学习的KPI自动化异常检测系统
运维帮
13+阅读 · 2017年8月16日
侦测欺诈交易(异常点检测)
GBASE数据工程部数据团队
20+阅读 · 2017年5月10日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 1月30日
VIP会员
相关资讯
异常检测(Anomaly Detection)综述
极市平台
20+阅读 · 2020年10月24日
异常检测论文大列表:方法、应用、综述
专知
126+阅读 · 2019年7月15日
一个牛逼的 Python 调试工具
机器学习算法与Python学习
15+阅读 · 2019年4月30日
动手写机器学习算法:异常检测 Anomaly Detection
七月在线实验室
11+阅读 · 2017年12月8日
基于机器学习的KPI自动化异常检测系统
运维帮
13+阅读 · 2017年8月16日
侦测欺诈交易(异常点检测)
GBASE数据工程部数据团队
20+阅读 · 2017年5月10日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员