Pattern-Based Test Suite Reduction Method for Smart Contracts
Testing in the software development process is one of the crucial disciplines. The immutability of deployed smart contracts makes tests particularly important in their design and implementation. The objective is to minimize the costs of smart contract testing by reducing the number of test cases. Th...
Saved in:
Main Author: | |
---|---|
Format: | Article |
Language: | English |
Published: |
MDPI AG
2025-01-01
|
Series: | Applied Sciences |
Subjects: | |
Online Access: | https://www.mdpi.com/2076-3417/15/2/620 |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
_version_ | 1832589247972900864 |
---|---|
author | Tomasz Górski |
author_facet | Tomasz Górski |
author_sort | Tomasz Górski |
collection | DOAJ |
description | Testing in the software development process is one of the crucial disciplines. The immutability of deployed smart contracts makes tests particularly important in their design and implementation. The objective is to minimize the costs of smart contract testing by reducing the number of test cases. The article presents the test suite reduction method for smart contracts, which exploits the knowledge of their design manner. In particular, the design of a mechanism for evaluating the list of verification rules controlling the execution of transactions was used. The proposed method defines a minimum set of test cases for smart contracts designed according to a specific design pattern. The test case reduction level was shown using analytical formulas enclosed in the paper. Compared to full coverage, the method reduces over 96% of test cases for a smart contract with at least eight verification rules. The performance tests were conducted and the analysis of the results was enclosed as well. Both the smart contract evaluation time and the test suite execution time are less than 0.01 of a millisecond. Besides, the method reduces the number of test data for smart contracts by over 79%. Therefore, the method can be especially useful in continuous software integration and delivery. |
format | Article |
id | doaj-art-362eedb18dfd45d79fb800fe3e590e55 |
institution | Kabale University |
issn | 2076-3417 |
language | English |
publishDate | 2025-01-01 |
publisher | MDPI AG |
record_format | Article |
series | Applied Sciences |
spelling | doaj-art-362eedb18dfd45d79fb800fe3e590e552025-01-24T13:20:08ZengMDPI AGApplied Sciences2076-34172025-01-0115262010.3390/app15020620Pattern-Based Test Suite Reduction Method for Smart ContractsTomasz Górski0Faculty of Computer Science, Gdynia Maritime University, Morska 81-87, 81-225 Gdynia, PolandTesting in the software development process is one of the crucial disciplines. The immutability of deployed smart contracts makes tests particularly important in their design and implementation. The objective is to minimize the costs of smart contract testing by reducing the number of test cases. The article presents the test suite reduction method for smart contracts, which exploits the knowledge of their design manner. In particular, the design of a mechanism for evaluating the list of verification rules controlling the execution of transactions was used. The proposed method defines a minimum set of test cases for smart contracts designed according to a specific design pattern. The test case reduction level was shown using analytical formulas enclosed in the paper. Compared to full coverage, the method reduces over 96% of test cases for a smart contract with at least eight verification rules. The performance tests were conducted and the analysis of the results was enclosed as well. Both the smart contract evaluation time and the test suite execution time are less than 0.01 of a millisecond. Besides, the method reduces the number of test data for smart contracts by over 79%. Therefore, the method can be especially useful in continuous software integration and delivery.https://www.mdpi.com/2076-3417/15/2/620blockchainsmart contracttest suite reductionsoftware design patternobject-oriented programmingfunctional programming |
spellingShingle | Tomasz Górski Pattern-Based Test Suite Reduction Method for Smart Contracts Applied Sciences blockchain smart contract test suite reduction software design pattern object-oriented programming functional programming |
title | Pattern-Based Test Suite Reduction Method for Smart Contracts |
title_full | Pattern-Based Test Suite Reduction Method for Smart Contracts |
title_fullStr | Pattern-Based Test Suite Reduction Method for Smart Contracts |
title_full_unstemmed | Pattern-Based Test Suite Reduction Method for Smart Contracts |
title_short | Pattern-Based Test Suite Reduction Method for Smart Contracts |
title_sort | pattern based test suite reduction method for smart contracts |
topic | blockchain smart contract test suite reduction software design pattern object-oriented programming functional programming |
url | https://www.mdpi.com/2076-3417/15/2/620 |
work_keys_str_mv | AT tomaszgorski patternbasedtestsuitereductionmethodforsmartcontracts |