Smart Contract Test Case Prioritization Based on Frequency and Gas Consumption
International Conference on Software Quality, Reliability and Security(2023)
摘要
Testing is an integral process in the development life cycle of a Smart Contract, especially considering the immutable nature of blockchains. Thus, rigorous testing of smart contracts is necessary to identify defects or vulnerabilities and correct them before deployment. This proactive approach prevents any unfair advantages that may be exploited by one or more entities within the smart contract. In this paper, we present a three-layered approach for prioritizing test cases using gas consumption values and frequency of test case targeting methods, aiming to enhance the efficiency of the testing process. We illustrate our approach by applying to the smart contract Ballot. sol. We used the Ethereum Virtual Machine environment, and generated test cases using the Bounded Model Checker engine of the Solidity compiler. Additionally, we created manual test cases to simulate real-time smart contract behavior. We use the test cases of the Ballot.sol contract to showcase the prioritized list of test cases along with their respective individual and cumulative statement coverages. Our approach offers a faster testing environment for smart contract deployment.
更多查看译文
关键词
Smart Contracts,Test Case Suite,Gas,Frequency
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要