科研成果详情

题名Automated Test Generation For Smart Contracts via On-Chain Test Case Augmentation and Migration
作者
发表日期2025
会议名称47th IEEE/ACM International Conference on Software Engineering, ICSE 2025
会议录名称Proceedings - International Conference on Software Engineering
ISSN0270-5257
页码1947-1959
会议日期2025-04-27——2025-04-27
会议地点can,Ottawa
摘要Pre-deployment testing has become essential to ensure the functional correctness of smart contracts. However, since smart contracts are stateful programs integrating many different functionalities, manually writing test cases to cover all potential usages requires significant effort from developers, leading to insufficient testing and increasing risks in practice. Although several testing techniques for smart contracts have been proposed, they primarily focus on detecting common low-level vulnerabilities such as re-entrancy, rather than generating expressive and function-relevant test cases that can reduce manual testing efforts. To bridge the gap, we propose Solmigrator, an automated technique designed to generate expressive and representative test cases for smart contracts. To our knowledge, Solmigrator is the first migration-based test generation technique for smart contracts, which extracts test cases from real-world usages of on-chain contracts and migrates them to test newly developed smart contracts with similar functionalities. Given a target smart contract to be tested and an on-chain similar source smart contract, Solmigrator first transforms the on-chain usage of the source contract into off-chain executable test cases based on on-chain transaction replay and dependency analysis. It then employs fine-grained static analysis to migrate the augmented test cases from the source to the target smart contract. We built a prototype of Solmigrator and have evaluated it on real-world smart contracts within the two most popular categories, ERC20 and ERC721. Our evaluation results demonstrate that Solmigrator effectively extracts test cases from existing on-chain smart contracts and accurately migrates them across different smart contracts, achieving an average precision of 96.3% and accuracy of 93.6%. Furthermore, the results indicate that these migrated test cases effectively cover common key functionalities of the target smart contracts. This provides promising evidence that real-world usages of existing smart contracts can be transformed into effective test cases for other newly developed smart contracts.
关键词Ethereum smart contracts test generation test migration
DOI10.1109/ICSE55347.2025.00096
URL查看来源
语种英语English
Scopus入藏号2-s2.0-105010323026
引用统计
文献类型会议论文
条目标识符https://repository.uic.edu.cn/handle/39GCC9TT/13440
专题个人在本单位外知识产出
通讯作者Chen,Jiachi; Chen,Zhong
作者单位
1.Peking University,School of Computer Science,Beijing,China
2.Sun Yat-sen University,Zhuhai,China
3.The State Key Laboratory of Blockchain and Data Security,Zhejiang University,Zhuhai,China
4.Monash University,Melbourne,Australia
5.Beijing Jiaotong University,Beijing Key Laboratory of Security and Privacy in Intelligent Transportation,Beijing,China
6.Sun Yat-sen University,School of Software Engineering,Zhuhai,China
7.University of Electronic Science and Technology of China,Chengdu,China
8.Peking University,National Engineering Research Center for Software Engineering,Beijing,China
推荐引用方式
GB/T 7714
Zhang,Jiashuo,Chen,Jiachi,Grundy,Johnet al. Automated Test Generation For Smart Contracts via On-Chain Test Case Augmentation and Migration[C], 2025: 1947-1959.
条目包含的文件
条目无相关文件。
个性服务
查看访问统计
谷歌学术
谷歌学术中相似的文章
[Zhang,Jiashuo]的文章
[Chen,Jiachi]的文章
[Grundy,John]的文章
百度学术
百度学术中相似的文章
[Zhang,Jiashuo]的文章
[Chen,Jiachi]的文章
[Grundy,John]的文章
必应学术
必应学术中相似的文章
[Zhang,Jiashuo]的文章
[Chen,Jiachi]的文章
[Grundy,John]的文章
相关权益政策
暂无数据
收藏/分享
所有评论 (0)
暂无评论
 

除非特别说明,本系统中所有内容都受版权保护,并保留所有权利。