Automatic Generation of Solidity Test for Blockchain Smart Contract using Many Objective Search and Dimensionality Reduction
Abstract
Blockchain and smart contract technologies have emerged as innovative approaches to trustworthy and reliable service computing. With the growing popularity of decentralized applications, the quantity of smart contracts has seen an exponential increase. Research on testing smart contracts has primarily focused on identifying specific vulnerabilities in smart contracts and blockchains. However, generating a robust test suite for smart contracts remains a daunting challenge. The state-of-the-art DynaMOSA algorithm uses many-objective optimization for test case generation, introducing preference sorting and dynamic target selection strategies. Yet, under hyper many-objective conditions, the algorithm faces difficulties including insufficient selection pressure and reduced efficiency. This paper proposes a solution to these issues by introducing a many-objective optimization algorithm with a dimensionality reduction strategy. The goal is to condense an extensive dataset into a smaller, more manageable and effective dataset using specific reduction criteria. Additionally, this paper utilizes 28 open-source Solidity projects from GitHub for testing. The experimental results show that compared to DynaMOSA, the proposed approach achieves higher testing coverage on most projects under test and shows a noticeable improvement in algorithm efficiency for the automatic generation of Solidity Tests.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.