咨询与建议

看过本文的还看了

相关文献

该作者的其他文献

文献详情 >PSTR: A Test Case Reuse Method... 收藏

PSTR: A Test Case Reuse Method Based on Path Similarity

作     者:Xu, Xinyue Chen, Sinong Guo, Zhonghao Chen, Xiangxian 

作者机构:Zhejiang Univ Coll Biomed Engn & Instrument Sci Hangzhou 310027 Zhejiang Peoples R China 

出 版 物:《IEEE ACCESS》 (IEEE Access)

年 卷 期:2025年第13卷

页      面:3175-3187页

核心收录:

主  题:Software testing Software testing test case reuse test case reuse path similarity path similarity control flow analysis control flow analysis unit testing unit testing 

摘      要:Software testing plays a critical role throughout the software development lifecycle. In modern development practices, frequent and incremental updates to code are common, and each update typically necessitates the generation of new test cases. While the generation of test cases can be automated, the creation and adjustment of test oracles (expected outputs or behaviors) still require significant manual effort. This process is time-consuming and labor-intensive, particularly when code changes are minor, making repeated oracle creation inefficient. Meanwhile, test cases and their associated oracles from previous versions, having been refined and validated through multiple iterations, are highly reliable and valuable. However, due to the changes in execution paths introduced by code updates, it is unclear which old test cases remain applicable to the new version, leaving these valuable resources underutilized. Consequently, the ability to effectively identify and reuse applicable test cases and their oracles from previous versions is of paramount importance. Currently, research on test case reuse in unit testing is relatively sparse. Existing approaches often focus on software requirements and pay limited attention to code-level changes. Even methods that consider code changes fail to ensure precision in selecting test cases or maintain high coverage in the reused test set. To address these challenges, this paper proposes a novel approach, Path Similarity-based Test case Reuse (PSTR), tailored for the characteristics of unit testing. PSTR significantly enhances testing efficiency and reduces costs by accurately identifying reusable test cases through path similarity analysis. The proposed PSTR method consists of three core modules: static analysis, dynamic analysis, and reuse. First, static analysis is performed on both the old and new code versions to generate their respective sets of static paths. Next, the test cases from the old version are executed on its code, e

读者评论 与其他读者分享你的观点

用户名:未登录
我的评分