Papers1 provider Ā· 1 record
December 1, 2022Ā· 2022 29th Asia-Pacific Software Engineering Conference (APSEC)
conference-paper
Open access

Data Flow Reduction Based Test Case Generation for Smart Contracts

Abstract

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.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.