Basis Path Coverage Criteria for Smart Contract Application Testing

11/24/2019
by   Xinming Wang, et al.
0

The widespread recognition of the smart contracts has established their importance in the landscape of next generation blockchain technology. However, writing a correct smart contract is notoriously difficult. Moreover, once a state-changing transaction is confirmed by the network, the result is immutable. For this reason, it is crucial to perform a thorough testing of a smart contract application before its deployment. This paper's focus is on the test coverage criteria for smart contracts, which are objective rules that measure test quality. We analyze the unique characteristics of the Ethereum smart contract program model as compared to the conventional program model. To capture essential control flow behaviors of smart contracts, we propose the notions of whole transaction basis path set and bounded transaction interaction. The former is a limited set of linearly independent inter-procedural paths from which the potentially infinite paths of Ethereum transactions can be constructed by linear combination, while the latter is the permutations of transactions within a certain bound. Based on these two notions, we define a family of path-based test coverage criteria. Algorithms are given to the generation of coverage requirements. A case study is conducted to compare the effectiveness of the proposed test coverage criteria with random testing and statement coverage testing.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/20/2023

TxT: Real-time Transaction Encapsulation for Ethereum Smart Contracts

Ethereum is a permissionless blockchain ecosystem that supports executio...
research
02/29/2020

ADF-GA: Data Flow Criterion Based Test Case Generation for Ethereum Smart Contracts

Testing is an important technique to improve the quality of Ethereum sma...
research
08/10/2019

Mutation Testing for Ethereum Smart Contract

Smart contract is a special program that manages digital assets on block...
research
06/29/2023

ItyFuzz: Snapshot-Based Fuzzer for Smart Contract

Smart contracts are critical financial instruments, and their security i...
research
08/02/2018

sCompile: Critical Path Identification and Analysis for Smart Contracts

Smart contracts are an innovation built on top of the blockchain technol...
research
05/15/2019

Harvey: A Greybox Fuzzer for Smart Contracts

We present Harvey, an industrial greybox fuzzer for smart contracts, whi...
research
06/17/2022

What makes Ethereum blockchain transactions be processed fast or slow? An empirical study

The Ethereum platform allows developers to implement and deploy applicat...

Please sign up or login with your details

Forgot password? Click here to reset