SolUnit: a framework for reducing execution time of smart contract unit tests

Proceedings of the 29th Annual International Conference on Computer Science and Software Engineering(2019)

引用 6|浏览41
暂无评分
摘要
Smart contracts are software programs implemented on a blockchain platform that monitor and automate the execution of contracts to ensure compliance with the terms and conditions of a contract. As such, smart contracts represent a new kind of software that poses its own engineering challenges and requires novel software engineering techniques. In particular, smart contracts require thorough testing before they are deployed because they can't be changed after deployment. This paper proposes a novel approach for executing unit tests for smart contracts intended to reduce test execution time. This reduction is achieved through the reuse of the deployment execution of the smart contract in each test and also the reuse of the setup execution of each test. We implemented the framework SolUnit that uses this approach to execute tests written in Java for Ethereum Solidity smart contracts. We also evaluated the framework SolUnit in five projects. The results show that our approach achieves a meaningful reduction of the time to execute the tests, without breaking the principle of independent tests. The experiments were performed in two environments: an in-memory simulated blockchain and a private Ethereum-based blockchain. Overall, our approach was able to reduce the test execution time by up to 70%.
更多
查看译文
关键词
Ethereum, SolUnit, blockchain, smart contract, software testing, solidity, test automation, testing framework, unit testing
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要