H. Medeiros, Patrícia Vilain, Vilmar César Pereira Júnior
{"title":"Reducing the execution time of unit tests of smart contracts in blockchain platforms","authors":"H. Medeiros, Patrícia Vilain, Vilmar César Pereira Júnior","doi":"10.1145/3330204.3330225","DOIUrl":null,"url":null,"abstract":"Smart Contracts are software code that resides within a blockchain, using its infrastructure as an advantage and guarantee of execution. Blockchain and smart contracts are enabling new business models and standards to information systems. However, a smart contract needs to be well tested before to be published in a blockchain, since it cannot be changed after being deployed. The execution time to deploy smart contracts and run their tests is considerable because all transactions must be mined before being added to a new block. This work proposes an approach to reuse the execution of the deployment and the setup of unit test in smart contracts to reduce the execution time of these tests. Experiments have shown a large reduction in the execution time of smart contract unit tests, without breaking the principle of test independency.","PeriodicalId":348938,"journal":{"name":"Proceedings of the XV Brazilian Symposium on Information Systems","volume":"39 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-05-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the XV Brazilian Symposium on Information Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3330204.3330225","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
Abstract
Smart Contracts are software code that resides within a blockchain, using its infrastructure as an advantage and guarantee of execution. Blockchain and smart contracts are enabling new business models and standards to information systems. However, a smart contract needs to be well tested before to be published in a blockchain, since it cannot be changed after being deployed. The execution time to deploy smart contracts and run their tests is considerable because all transactions must be mined before being added to a new block. This work proposes an approach to reuse the execution of the deployment and the setup of unit test in smart contracts to reduce the execution time of these tests. Experiments have shown a large reduction in the execution time of smart contract unit tests, without breaking the principle of test independency.