AGTS: Novel automated generation of smart contract test suites for Hyperledger Fabric
Abstract The robustness and reliability of blockchain applications, critically depend on thorough testing. This study introduces AGTS, an automated framework for generating smart contract test suites on Hyperledger Fabric, significantly reducing manual effort while improving test coverage and securi...
Saved in:
| Main Authors: | , , |
|---|---|
| Format: | Article |
| Language: | English |
| Published: |
Nature Portfolio
2025-08-01
|
| Series: | Scientific Reports |
| Subjects: | |
| Online Access: | https://doi.org/10.1038/s41598-025-14218-2 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1849343857824628736 |
|---|---|
| author | Lixue Liu Qiqi Gu Wei Ke |
| author_facet | Lixue Liu Qiqi Gu Wei Ke |
| author_sort | Lixue Liu |
| collection | DOAJ |
| description | Abstract The robustness and reliability of blockchain applications, critically depend on thorough testing. This study introduces AGTS, an automated framework for generating smart contract test suites on Hyperledger Fabric, significantly reducing manual effort while improving test coverage and security. The framework integrates static and dynamic analysis, leveraging symbolic execution and fuzz testing to detect vulnerabilities. The project is implemented in C#, and uses three test cases: CoCoME, LibraryMS and LoanPS, with their requirements as input, and generates their closely related test cases. We generated 34 test cases for CoCoME, 32 for LibraryMS, and 28 for LoanPS. Combining the test cases, their executable scripts were generated. Finally, we tested all the targeted smart contracts rigorously against the predefined criteria. The generated scripts undergo the quality assurance using ShellCheck, deploying on the continuous integration system, that further enhances the reliability and maintainability of these tests. AGTS automates the entire process of test script creation and verification, drastically reducing the manual effort involved in preparing test cases. It facilitates rapid and thorough testing cycles by generating dedicated scripts that execute specific test scenarios on smart contracts, verifying their behavior and performance. By automating the tedious and error-prone task of writing test cases, AGTS accelerates the development process and fortifies the security framework of blockchain applications. Comprehensive evaluation of AGTS across diverse real world smart contracts demonstrated the effectiveness in defect detection, significantly outperforming existing methods. The contribution of AGTS extends beyond providing a practical testing tool, by offering developers a robust framework for ensuring the reliability and security of their smart contracts. AGTS not only expedites test preparation but also ensures comprehensive test coverage, thus improving the overall quality of blockchain applications. |
| format | Article |
| id | doaj-art-ecec5debcc6840beb0c277dcbd728ee8 |
| institution | Kabale University |
| issn | 2045-2322 |
| language | English |
| publishDate | 2025-08-01 |
| publisher | Nature Portfolio |
| record_format | Article |
| series | Scientific Reports |
| spelling | doaj-art-ecec5debcc6840beb0c277dcbd728ee82025-08-20T03:42:49ZengNature PortfolioScientific Reports2045-23222025-08-0115111510.1038/s41598-025-14218-2AGTS: Novel automated generation of smart contract test suites for Hyperledger FabricLixue Liu0Qiqi Gu1Wei Ke2Faculty of Applied Sciences, Macao Polytechnic UniversityFaculty of Applied Sciences, Macao Polytechnic UniversityFaculty of Applied Sciences, Macao Polytechnic UniversityAbstract The robustness and reliability of blockchain applications, critically depend on thorough testing. This study introduces AGTS, an automated framework for generating smart contract test suites on Hyperledger Fabric, significantly reducing manual effort while improving test coverage and security. The framework integrates static and dynamic analysis, leveraging symbolic execution and fuzz testing to detect vulnerabilities. The project is implemented in C#, and uses three test cases: CoCoME, LibraryMS and LoanPS, with their requirements as input, and generates their closely related test cases. We generated 34 test cases for CoCoME, 32 for LibraryMS, and 28 for LoanPS. Combining the test cases, their executable scripts were generated. Finally, we tested all the targeted smart contracts rigorously against the predefined criteria. The generated scripts undergo the quality assurance using ShellCheck, deploying on the continuous integration system, that further enhances the reliability and maintainability of these tests. AGTS automates the entire process of test script creation and verification, drastically reducing the manual effort involved in preparing test cases. It facilitates rapid and thorough testing cycles by generating dedicated scripts that execute specific test scenarios on smart contracts, verifying their behavior and performance. By automating the tedious and error-prone task of writing test cases, AGTS accelerates the development process and fortifies the security framework of blockchain applications. Comprehensive evaluation of AGTS across diverse real world smart contracts demonstrated the effectiveness in defect detection, significantly outperforming existing methods. The contribution of AGTS extends beyond providing a practical testing tool, by offering developers a robust framework for ensuring the reliability and security of their smart contracts. AGTS not only expedites test preparation but also ensures comprehensive test coverage, thus improving the overall quality of blockchain applications.https://doi.org/10.1038/s41598-025-14218-2Smart contractHyperledger fabricTest suiteTest case generationComposed order |
| spellingShingle | Lixue Liu Qiqi Gu Wei Ke AGTS: Novel automated generation of smart contract test suites for Hyperledger Fabric Scientific Reports Smart contract Hyperledger fabric Test suite Test case generation Composed order |
| title | AGTS: Novel automated generation of smart contract test suites for Hyperledger Fabric |
| title_full | AGTS: Novel automated generation of smart contract test suites for Hyperledger Fabric |
| title_fullStr | AGTS: Novel automated generation of smart contract test suites for Hyperledger Fabric |
| title_full_unstemmed | AGTS: Novel automated generation of smart contract test suites for Hyperledger Fabric |
| title_short | AGTS: Novel automated generation of smart contract test suites for Hyperledger Fabric |
| title_sort | agts novel automated generation of smart contract test suites for hyperledger fabric |
| topic | Smart contract Hyperledger fabric Test suite Test case generation Composed order |
| url | https://doi.org/10.1038/s41598-025-14218-2 |
| work_keys_str_mv | AT lixueliu agtsnovelautomatedgenerationofsmartcontracttestsuitesforhyperledgerfabric AT qiqigu agtsnovelautomatedgenerationofsmartcontracttestsuitesforhyperledgerfabric AT weike agtsnovelautomatedgenerationofsmartcontracttestsuitesforhyperledgerfabric |