SuMo: A Mutation Testing Strategy for Solidity Smart Contracts

被引:12
作者
Barboni, Morena [1 ]
Morichetta, Andrea [2 ]
Polini, Andrea [2 ]
机构
[1] Consiglio Nazl Ric CNR, Ist Anal Sistemi Informat IASI, Rome, Italy
[2] Univ Camerino, Sch Sci & Technol, Camerino, Italy
来源
2021 IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATION OF SOFTWARE TEST (AST 2021) | 2021年
关键词
Mutation Testing; Solidity; Smart contracts;
D O I
10.1109/AST52587.2021.00014
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Smart Contracts are software programs that are deployed and executed within a blockchain infrastructure. Due to their immutable nature, directly resulting from the specific characteristics of the deploying infrastructure, smart contracts must be thoroughly tested before their release. Testing is one of the main activities that can help to improve the reliability of a smart contract, so as to possibly prevent considerable loss of valuable assets. It is therefore important to provide the testers with tools that permit them to assess the activity they performed. Mutation testing is a powerful approach for assessing the fault-detection capability of a test suite. In this paper, we propose SuMo, a novel mutation testing tool for Ethereum Smart Contracts. SuMo implements a set of 44 mutation operators that were designed starting from the latest Solidity documentation, and from well-known mutation testing tools. These allow to simulate a wide variety of faults that can be made by smart contract developers. The set of operators was designed to limit the generation of stillborn mutants, which slow down the mutation testing process and limit the usability of the tool. We report a first evaluation of SuMo on open-source projects for which test suites were available. The results we got are encouraging, and they suggest that SuMo can effectively help developers to deliver more reliable smart contracts.
引用
收藏
页码:50 / 59
页数:10
相关论文
共 22 条
[1]  
Andesta E., 2019, ABS191204780 CORR
[2]  
[Anonymous], BYZANTIUM VERSION
[3]   A Survey of Attacks on Ethereum Smart Contracts (SoK) [J].
Atzei, Nicola ;
Bartoletti, Massimo ;
Cimoli, Tiziana .
PRINCIPLES OF SECURITY AND TRUST (POST 2017), 2017, 10204 :164-186
[4]  
Buterin V., 2013, ETHEREUM WHITEP
[5]   Deviant: A Mutation Testing Tool for Solidity Smart Contracts [J].
Chapman, Patrick ;
Xu, Dianxiang ;
Deng, Lin ;
Xiong, Yin .
2019 IEEE INTERNATIONAL CONFERENCE ON BLOCKCHAIN (BLOCKCHAIN 2019), 2019, :319-324
[6]   Engineering Trustable Choreography-based Systems using Blockchain [J].
Corradini, F. ;
Marcelletti, A. ;
Morichetta, A. ;
Polini, A. ;
Re, B. ;
Tiezzi, F. .
PROCEEDINGS OF THE 35TH ANNUAL ACM SYMPOSIUM ON APPLIED COMPUTING (SAC'20), 2020, :1470-1479
[7]  
Destefanis G, 2018, 2018 IEEE 1ST INTERNATIONAL WORKSHOP ON BLOCKCHAIN ORIENTED SOFTWARE ENGINEERING (IWBOSE), P19, DOI 10.1109/IWBOSE.2018.8327567
[8]   Security Vulnerabilities in Ethereum Smart Contracts [J].
Dika, Ardit ;
Nowostawski, Mariusz .
IEEE 2018 INTERNATIONAL CONGRESS ON CYBERMATICS / 2018 IEEE CONFERENCES ON INTERNET OF THINGS, GREEN COMPUTING AND COMMUNICATIONS, CYBER, PHYSICAL AND SOCIAL COMPUTING, SMART DATA, BLOCKCHAIN, COMPUTER AND INFORMATION TECHNOLOGY, 2018, :955-962
[9]   Mutation Testing of Smart Contracts at Scale [J].
Hartel, Pieter ;
Schumi, Richard .
TESTS AND PROOFS (TAP 2020), 2020, 12165 :23-42
[10]   Practical Mutation Testing for Smart Contracts [J].
Honig, Joran J. ;
Everts, Maarten H. ;
Huisman, Marieke .
DATA PRIVACY MANAGEMENT, CRYPTOCURRENCIES AND BLOCKCHAIN TECHNOLOGY, 2019, 11737 :289-303