RMIT University
Browse

Data Flow Reduction Based Test Case Generation for Smart Contracts

conference contribution
posted on 2024-11-03, 15:38 authored by Shunhui Ji, Shaoqing Zhu, Pengcheng Zhang, Hai DongHai Dong
With the widespread use of smart contracts, security incidents caused by improper programming have drawn increasing attention. Data flow correctness is a fundamental and vital requirement for smart contracts. Although test cases generated by existing approaches for data flow testing of smart contracts can achieve certain coverage, not all def-use (definitionuse) pairs are covered, which may result in some errors not being detected. To further improve the adequacy and efficiency of testing, we present an approach named TCG-Re (T est C ase G eneration Combined with Data Flow R eduction) to generate test cases for data flow testing of smart contracts. Data flow reduction is performed to reduce redundant def-use pairs and obtain the final test requirements in a smart contract. The test case generation process is optimized to improve the coverage of the generated test cases for the def-use pairs. We collect 30 smart contracts of different scales to perform experimental evaluation. The result shows that, compared with other existing approaches, TCG-Re can not only achieve full coverage for most contracts, but also be more efficient. In addition, TCG-Re is also effective for discovering several types of errors in smart contracts

History

Related Materials

  1. 1.
    ISBN - Is published in 9781665455374 (urn:isbn:9781665455374)
  2. 2.

Start page

149

End page

158

Total pages

10

Outlet

2022 29th Asia-Pacific Software Engineering Conference (APSEC)

Name of conference

2022 29th Asia-Pacific Software Engineering Conference (APSEC)

Publisher

IEEE

Place published

Japan

Start date

2022-12-06

End date

2022-12-09

Language

English

Copyright

© 2022 IEEE

Former Identifier

2006127158

Esploro creation date

2023-12-22

Usage metrics

    Scholarly Works

    Keywords

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC