Authors:
Mariam Lahami
1
;
Moez Krichen
1
;
2
;
Mohamed Mnassar
1
;
Racem Mrabet
1
and
Mohamed Ben Rhouma
1
Affiliations:
1
ReDCAD Lab, National School of Engineers of Sfax, Sfax University, Sfax, Tunisia
;
2
Faculty of CSIT, Al-Baha University, Al-Baha, Saudi Arabia
Keyword(s):
Fuzz Testing, Blockchain, Smart Contracts, Ethereum, Ganache, Brownie.
Abstract:
The widespread and well-known blockchain platform that makes use of smart contracts is Ethereum. The key feature of these computer programs is that once deployed, they cannot be updated anymore. Therefore, it is highly necessary to efficiently test smart contracts before their deployment. This paper presents a Web-based testing tool called LeoKai that makes it easy to automatically generate test inputs and also unit test templates to detect bugs and vulnerabilities in Ethereum smart contracts. It helps developers to perform manual UI tests by invoking smart contracts deployed on the Ganache blockchain. Furthermore, it supports black-box fuzz testing and randomly generates test inputs. Blockchain developers may use the unit test template generator to generate unit tests. It also includes a code coverage module that highlights their efficiency by assessing function, branch, and line coverage. Finally, the prototype and its implementation details are illustrated.