IABC-TCG: Improved artificial bee colony algorithm-based test case generation for smart contracts
【Author】 Ji, Shunhui; Gong, Jiahao; Dong, Hai; Zhang, Pengcheng; Zhu, Shaoqing
【Source】JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS
【影响因子】1.864
【Abstract】With the widespread application of smart contracts, there is a growing concern over the quality assurance of smart contracts. The data flow testing is an important technology to ensure the correctness of smart contracts. We propose an approach named IABC-TCG (Improved Artificial Bee Colony-Test Case Generation) to generate test cases for the data flow testing of smart contracts. With a dominance relations-based fitness function, an improved artificial bee colony algorithm is used to generate test cases, in which the bee colony search coefficient is adaptively adjusted to improve the effectiveness and efficiency of the search. In addition, an improved test case selection and updation strategy is used to avoid unnecessary test cases. The experimental results show that IABC-TCG achieves 100% coverage for all the test requirements on a dataset of 30 smart contracts and outperforms the baseline approaches in terms of the number of test cases and the execution time. Performing tests with the generated test cases, IABC-TCG can find more errors with less test cost. We propose IABC-TCG (Improved Artificial Bee Colony-Test Case Generation) to generate test cases for the data flow testing of smart contracts. The improved ABC (Artificial Bee Colony) algorithm is applied to generate test cases, in which a dominance relations based fitness function is used to guide the searching for test cases that cover the to-be-tested definition-use pairs and the bee colony search coefficient is adaptively adjusted to improve the effectiveness and efficiency of the search. In addition, the test case selection and updation strategy is improved to avoid unnecessary test cases. Experimental results show that IABC-TCG achieves 100% coverage and outperforms the comparative approaches in the number of test cases and the average execution time. image
【Keywords】artificial bee colony algorithm; data flow testing; smart contract; test case generation
【发表时间】2024 2024 AUG 8
【收录时间】2024-08-14
【文献类型】实验仿真
【主题类别】
区块链技术-核心技术-智能合约
【DOI】 10.1002/smr.2719
评论