RMIT University
Browse

Test-Case Generation for Data Flow Testing of Smart Contracts Based on Improved Genetic Algorithm

journal contribution
posted on 2024-11-02, 20:39 authored by Shunhui Ji, Shaoqing Zhu, Pengcheng Zhang, Hai DongHai Dong, Jianan Yu
Smart contracts are commonly deployed for safety-critical applications, the quality assurance of which has been a vital factor. Test cases are standard means to ensure the correctness of data flows in smart contracts. To more efficiently generate test cases with high coverage, we propose an improved genetic algorithm-based test-case generation approach for smart contract data flow testing. Our approach introduces the theory of particle swarm optimization into the genetic algorithm, which reduces the influence brought by the randomness of genetic operations and enhances its capability to find global optima. A set of 30 real smart contracts deployed on Ethereum and GitHub is collected to perform the experimental study, on which our approach is compared with three baseline approaches. The experimental results show that, in most cases, the coverage of the test cases generated by our approach is significantly higher than the baseline approaches with relatively lower numbers of iterations and lower execution time.

History

Related Materials

  1. 1.
    DOI - Is published in 10.1109/TR.2022.3173025
  2. 2.
    ISSN - Is published in 00189529

Journal

IEEE Transactions on Reliability

Volume

72

Issue

1

Start page

358

End page

371

Total pages

14

Publisher

IEEE

Place published

United States

Language

English

Copyright

© 2022 IEEE

Former Identifier

2006116975

Esploro creation date

2024-03-09