遇见数据集

Optimizing Class Integration Testing with Criticality-Driven Test Order Generation

收藏
Zenodo2025-04-25 更新2026-05-26 收录
官方服务:

资源简介:

The generation of class integration test orders (CITOs) is a pivotal element in integration testing, which focuses on determining the optimal order for integrating classes while testing an object-oriented system. Due to a high number of dependencies and their possible error proneness, some classes are more critical than others in a program. Existing methods for handling these classes only assess risk in terms of their dependencies; they do not consider historical bug information as an additional indicator and mainly work on small programs. To overcome these limitations, this paper introduces Criticality-Driven CITO (CD-CITO) generation, an innovative approach to optimize CITOs by focusing on class criticality. CD-CITO assesses both the importance of a class in terms of its dependencies and the likelihood of defects, based on historical bug data, to determine a criticality score. Then, it reformulates the CITO generation problem as a reinforcement learning task and uses the Advantage Actor-Critic (A2C) algorithm to address it. We propose a novel reward calculation strategy to guide the learning agent, balancing stubbing costs with the criticality values of classes to optimize the test order. To extract fault proneness information and access the approach, the paper uses Defects4j, a data set that contains real bugs and patches of Java programs. The results obtained show that CD-CITO effectively identifies and prioritizes highly critical classes and also minimizes stubbing costs while generating CITOs, which makes it a valuable tool for integration testing.

类集成测试顺序(Class Integration Test Orders,CITOs)的生成是集成测试的关键环节,其核心目标是在面向对象系统的集成测试流程中,确定最优的类集成顺序。由于程序中存在大量依赖关系且此类依赖易引发错误,程序中的部分类相较于其余类具备更高的关键性。现有针对此类关键类的处理方法仅从依赖关系维度评估风险,未将历史缺陷信息作为额外评估指标,且大多仅适用于小型程序。 为克服上述局限,本文提出了关键性驱动的类集成测试顺序生成方法(Criticality-Driven CITO,CD-CITO),这是一种通过聚焦类关键性来优化类集成测试顺序生成的创新方案。CD-CITO结合类在依赖关系中的重要性,以及基于历史缺陷数据计算得到的缺陷发生概率,以确定类的关键性得分。随后,该方法将类集成测试顺序生成问题重构为强化学习任务,并采用优势演员-评论家(Advantage Actor-Critic,A2C)算法进行求解。本文提出了一种新颖的奖励计算策略,用于指导学习智能体,通过平衡桩代码成本与类的关键性值来优化测试顺序。 为提取缺陷倾向性信息并验证所提方法,本文采用了Defects4j数据集——该数据集包含Java程序的真实缺陷与对应补丁数据。实验结果表明,CD-CITO能够有效识别并优先处理高关键性类,同时在生成类集成测试顺序时最小化桩代码成本,因此可作为集成测试的有效辅助工具。

提供机构:
Zenodo
创建时间:
2024-10-11
二维码
社区交流群
二维码
科研交流群
商业服务