面向两阶段分组的测试用例优先级排序方法
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP311

基金项目:

国家自然科学基金(62262025); 赣鄱俊才支持计划-主要学科学术和技术带头人培养项目-领军人才(学术类) (20243BCE51024); 江西省自然科学基金重点项目(20224ACB202012)


Test Case Prioritization Approach Based on Two-phase Grouping
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    测试用例优先级排序方法TCP在缓解测试开销方面备受关注. 基于不同优先级策略的贪心算法是TCP中常用的方法. 然而, 现有基于贪心算法的TCP技术多使用单一的排序策略, 且每轮迭代排序过程一次性考虑全部测试用例, 而未关注用例间的关系, 导致在覆盖信息和排序方面的处理上耗时过长, 极大降低排序效率. 同时, 在单一的排序策略中, Additional策略得到广泛研究, 但其受随机因素影响较大, 当出现平局时, 通常会随机选择待排用例, 影响排序的有效性. 基于此, 提出一种面向两阶段分组的测试用例优先级排序方法TPG-TCP. 第1阶段进行粗粒度测试用例分组, 通过挖掘用例间的隐藏关系, 将它们分为关键用例组和普通用例组, 为下一阶段采用多样性策略排序做准备, 以提高排序效率. 第2阶段进行细粒度测试用例分组排序, 根据迭代次数将关键用例分组, 为减少Additional策略中随机因素的干扰, 提出基于用例潜力度的TP-Additional策略对一部分关键用例排序, 同时采用简单高效的Total策略对普通用例与另一部分关键用例排序, 将排序结果追加至TP-Additional策略的排序结果中, 在排序有效性提升的同时也提高了效率. 通过与8种相关方法在6个数据集上的对比结果发现, 所提方法是高效且可行的, 在APFDTETC指标上分别平均提升约1.29%和9.54%.

    Abstract:

    Test case prioritization (TCP) has gained significant attention due to its potential to reduce testing costs. Greedy algorithms based on various prioritization strategies are commonly used in TCP. However, most existing greedy algorithm-based TCP techniques rely on a single prioritization strategy and process all test cases simultaneously during each iteration, without considering the relationships between test cases. This results in excessive computational overhead when handling coverage information and performing prioritization, thus reducing overall efficiency. Among single-strategy approaches, the Additional strategy has been extensively studied but remains highly sensitive to random factors. When a tie occurs, test cases are typically selected at random, compromising prioritization effectiveness. To address these issues, a test case prioritization approach based on two-phase grouping (TPG-TCP) is proposed. In the first phase, coarse-grained grouping is conducted by mining hidden relationships among test cases, thus dividing them into a key group and an ordinary group. This lays the groundwork for applying diversity-based strategies in the next phase to enhance prioritization efficiency. In the second phase, fine-grained prioritization of test cases is performed. Key test cases are further subdivided based on the number of iterations. To mitigate the randomness inherent in the Additional strategy, a TP-Additional strategy based on test case potency is introduced to prioritize a portion of the key test cases. Meanwhile, a simple and efficient Total strategy is applied to prioritize the ordinary test cases and remaining key test cases. The results from the Total strategy are appended to those produced by the TP-Additional strategy. This method improves both the effectiveness and efficiency of test case prioritization. Experimental results on six datasets, compared with eight existing methods, demonstrate that the proposed method achieves average improvements of 1.29% in APFD and 9.54% in TETC.

    参考文献
    相似文献
    引证文献
引用本文

钱忠胜,秦朗悦,范赋宇,付庭峰.面向两阶段分组的测试用例优先级排序方法.软件学报,,():1-20

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2024-12-04
  • 最后修改日期:2025-02-02
  • 录用日期:
  • 在线发布日期: 2025-07-30
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号