Cargando…

Multi-objective test selection of smart contract and blockchain applications

The ability to create decentralized applications without the authority of a single entity has attracted numerous developers to build applications using blockchain technology. However, ensuring the correctness of such applications poses significant challenges, as it can result in financial losses or,...

Descripción completa

Detalles Bibliográficos
Autores principales: Alkhazi, Bader, Alipour, Amin
Formato: Online Artículo Texto
Lenguaje:English
Publicado: PeerJ Inc. 2023
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10588722/
https://www.ncbi.nlm.nih.gov/pubmed/37869450
http://dx.doi.org/10.7717/peerj-cs.1587
_version_ 1785123640357945344
author Alkhazi, Bader
Alipour, Amin
author_facet Alkhazi, Bader
Alipour, Amin
author_sort Alkhazi, Bader
collection PubMed
description The ability to create decentralized applications without the authority of a single entity has attracted numerous developers to build applications using blockchain technology. However, ensuring the correctness of such applications poses significant challenges, as it can result in financial losses or, even worse, a loss of user trust. Testing smart contracts introduces a unique set of challenges due to the additional restrictions and costs imposed by blockchain platforms during test case execution. Therefore, it remains uncertain whether testing techniques developed for traditional software can effectively be adapted to smart contracts. In this study, we propose a multi-objective test selection technique for smart contracts that aims to balance three objectives: time, coverage, and gas usage. We evaluated our approach using a comprehensive selection of real-world smart contracts and compared the results with various test selection methods employed in traditional software systems. Statistical analysis of our experiments, which utilized benchmark Solidity smart contract case studies, demonstrates that our approach significantly reduces the testing cost while still maintaining acceptable fault detection capabilities. This is in comparison to random search, mono-objective search, and the traditional re-testing method that does not employ heuristic search.
format Online
Article
Text
id pubmed-10588722
institution National Center for Biotechnology Information
language English
publishDate 2023
publisher PeerJ Inc.
record_format MEDLINE/PubMed
spelling pubmed-105887222023-10-21 Multi-objective test selection of smart contract and blockchain applications Alkhazi, Bader Alipour, Amin PeerJ Comput Sci Software Engineering The ability to create decentralized applications without the authority of a single entity has attracted numerous developers to build applications using blockchain technology. However, ensuring the correctness of such applications poses significant challenges, as it can result in financial losses or, even worse, a loss of user trust. Testing smart contracts introduces a unique set of challenges due to the additional restrictions and costs imposed by blockchain platforms during test case execution. Therefore, it remains uncertain whether testing techniques developed for traditional software can effectively be adapted to smart contracts. In this study, we propose a multi-objective test selection technique for smart contracts that aims to balance three objectives: time, coverage, and gas usage. We evaluated our approach using a comprehensive selection of real-world smart contracts and compared the results with various test selection methods employed in traditional software systems. Statistical analysis of our experiments, which utilized benchmark Solidity smart contract case studies, demonstrates that our approach significantly reduces the testing cost while still maintaining acceptable fault detection capabilities. This is in comparison to random search, mono-objective search, and the traditional re-testing method that does not employ heuristic search. PeerJ Inc. 2023-10-17 /pmc/articles/PMC10588722/ /pubmed/37869450 http://dx.doi.org/10.7717/peerj-cs.1587 Text en ©2023 Alkhazi and Alipour https://creativecommons.org/licenses/by/4.0/This is an open access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/) , which permits unrestricted use, distribution, reproduction and adaptation in any medium and for any purpose provided that it is properly attributed. For attribution, the original author(s), title, publication source (PeerJ Computer Science) and either DOI or URL of the article must be cited.
spellingShingle Software Engineering
Alkhazi, Bader
Alipour, Amin
Multi-objective test selection of smart contract and blockchain applications
title Multi-objective test selection of smart contract and blockchain applications
title_full Multi-objective test selection of smart contract and blockchain applications
title_fullStr Multi-objective test selection of smart contract and blockchain applications
title_full_unstemmed Multi-objective test selection of smart contract and blockchain applications
title_short Multi-objective test selection of smart contract and blockchain applications
title_sort multi-objective test selection of smart contract and blockchain applications
topic Software Engineering
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10588722/
https://www.ncbi.nlm.nih.gov/pubmed/37869450
http://dx.doi.org/10.7717/peerj-cs.1587
work_keys_str_mv AT alkhazibader multiobjectivetestselectionofsmartcontractandblockchainapplications
AT alipouramin multiobjectivetestselectionofsmartcontractandblockchainapplications