Automated Test-Case Generation for Solidity Smart Contracts: the AGSolT Approach and its Evaluation

Stefan Driessen, Dario Di Nucci, Geert Monsieur, Damian A. Tamburri, Willem-Jan van den Heuvel
2/17/2021
cs.SE

Official code: AGSolT/AGSolT-2020-Submission (7 stars, JavaScript, last commit 2021-04-15).

Abstract

Blockchain and smart contract technology are novel approaches to data and code management that facilitate trusted computing by allowing for development in a distributed and decentralized manner. Testing smart contracts comes with its own set of challenges which have not yet been fully identified and explored.

Show full abstract

Although existing tools can identify and discover known vulnerabilities and their interactions on the Ethereum blockchain through random search or symbolic execution, these tools generally do not produce test suites suitable for human oracles. In this paper, we present AGSOLT (Automated Generator of Solidity Test Suites). We demonstrate its efficiency by implementing two search algorithms to automatically generate test suites for stand-alone Solidity smart contracts, taking into account some of the blockchain-specific challenges. To test AGSOLT, we compared a random search algorithm and a genetic algorithm on a set of 36 real-world smart contracts. We found that AGSOLT is capable of achieving high branch coverage with both approaches and even discovered some errors in some of the most popular Solidity smart contracts on Github.

View on arXivView PDF

Code Implementations(1)

72JavaScript, PythonOct 29, 20205 years ago

Similar Papers

Cite this paper

@article{driessen2021automated,
  title  = {Automated Test-Case Generation for Solidity Smart Contracts: the AGSolT Approach and its Evaluation},
  author = {Stefan Driessen and Dario Di Nucci and Geert Monsieur and Damian A. Tamburri and Willem-Jan van den Heuvel},
  year   = {2021},
  eprint = {2102.08864},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.08864}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2102.08864.svg)](https://codeofpaper.com/paper/2102.08864)

Discussion