arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.02875cs.SE
收藏

METFORD——面向 Android 的变异测试框架

METFORD -- Mutation tEsTing Framework fOR anDroid

Auri M. R. Vincenzi, Pedro H. Kuroishi, João C. M. Bispo, Ana R. C. da Veiga, David R. C. da Mata, Francisco B. Azevedo, Ana C. R. Paiva

AI总结:

本文提出 Android 变异测试框架 METFORD,利用变异体模式集成传统与 Android 专用算子,显著降低时间、磁盘和碳足迹成本。

摘要:

变异测试可用于指导测试用例生成,也可作为评估测试套件质量的技术。尽管变异测试应用频繁,但在移动领域的应用并不普遍。变异测试的一个关键挑战是其计算成本:生成变异体、在每个变异体上运行测试用例并分析结果,可能需要大量时间和资源。本研究致力于降低 Android 变异测试成本。研究依据变异体模式(即将多个变异体实现到单个代码文件中)实现了变异测试算子,包括传统算子和 Android 专用算子。文中还描述了一个为执行测试用例并确定变异分数而开发的 Android 变异测试框架。额外的变异算子可用 JavaScript 实现,并能轻松集成到该框架中。通过案例研究验证了整体方法,结果表明变异体模式相比传统变异策略(每个变异体一个文件)具有优势。结果显示,变异体模式在所有评估方面均优于传统变异,且没有额外成本:变异体生成耗时减少 8.50%,所需磁盘空间减少 99.78%,平均运行速度比传统变异快 6.45%。此外,从可持续性指标来看,变异体模式的碳足迹比传统策略低 8.18%。

英文摘要:

Mutation testing may be used to guide test case generation and as a technique to assess the quality of test suites. Despite being used frequently, mutation testing is not so commonly applied in the mobile world. One critical challenge in mutation testing is dealing with its computational cost. Generating mutants, running test cases over each mutant, and analyzing the results may require significant time and resources. This research aims to contribute to reducing Android mutation testing costs. It implements mutation testing operators (traditional and Android-specific) according to mutant schemata (implementing multiple mutants into a single code file). It also describes an Android mutation testing framework developed to execute test cases and determine mutation scores. Additional mutation operators can be implemented in JavaScript and easily integrated into the framework. The overall approach is validated through case studies showing that mutant schemata have advantages over the traditional mutation strategy (one file per mutant). The results show mutant schemata overcome traditional mutation in all evaluated aspects with no additional cost: it takes 8.50% less time for mutant generation, requires 99.78% less disk space, and runs, on average, 6.45% faster than traditional mutation. Moreover, considering sustainability metrics, mutant schemata have 8,18% less carbon footprint than traditional strategy.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑