Publications-Theses
Article View/Open
Publication Export
-
題名 基於行為驅動開發製程的區塊鏈智能合約整合測試
A Study of BDD-style Smart Contract Integration Test on the Blockchain作者 鄭敬儒
Cheng, Ching-Ju貢獻者 廖峻鋒
Liao, Chun-Feng
鄭敬儒
Cheng, Ching-Ju關鍵詞 區塊鏈
智能合約
行為驅動開發
Blockchain
Smart contract
BDD日期 2018 上傳時間 3-Jul-2018 17:31:21 (UTC+8) 摘要 近年來區塊鏈技術受到相當重視,相關應用也開始大量被開發。智能合約是運行於區塊鏈上,用於執行業務、交易的重要元件。近年來多學者不約而同地發現,如何驗證智能合約正確與完整反映繁瑣的業務規則,是區塊鏈應用程式開發的重要議題。然而,目前針對此議題仍欠缺系統化整合驗證與測試機制來確保所開發智慧合約的正確性。針對此一挑戰,本研究主要目的在於探究如何將行為驅動開發製程應用於區塊鏈智能合約的整合測試,利用行為驅動開發結合測試驅動開發製成實際開發一個支援BDD開發方法的Solidity智能合約語言自動整合測試平台,並且在本論文中以紅利點數交換為案例作為示範。此外,本研究亦以購物網站之購物車需求作為案例,就所開發系統進行使用者質性測試,針對易用性進行檢驗,研究結果顯示,本研究提出的機制能有效降低智能合約開發測試複雜度與負擔,提升合約品質。
The importance of blockchain technologies and applications increases rapidly in recent years. A smart contract is a software component that encapsulates business and transaction logic of an application running on top of a blockchain network. Automatic integration testing and verification of smart contracts have become a vital software engineering issue of contract development. Nevertheless, there still lacks a systematic automated integration testing and verification mechanism. This thesis proposes a BDD-style automatic integration testing platform for Solidity–based smart contracts by considering the cross-cutting concerns of integration testing. Besides, this research has implemented a prototype system and a loyalty point exchanging scenario. The outcomes of this research are helpful for minimizing the cost and complexity of smart contract development and thus increase the quality of the blockchain applications.參考文獻 [1] N. Szabo, "Formalizing and securing relationships on public networks," First Monday, vol. 2, no. 9, 1997.[2] Nakamoto, Satoshi Bitcoin: A peer-to-peer electronic cash system. 2009.[3] K. Christidis and M. Devetsikiotis, "Blockchains and smart contracts for the internet of things," IEEE Access, vol. 4, pp. 2292–2303, 2016.[4] M. Swan, Blockchain: Blueprint for a new econ- omy. “O’Reilly Media, Inc.”, 2015.[5] D. Mamnani, “Testing of smart contracts in the blockchain world,” Blog post, 2017. [Online]. Available: https://www. capgemini.com/blog/capping-it-off/2017/01/ testing-of-smart-contracts-in-the-blockchain-world[6] L. Crispin and J. Gregory, Agile testing: A prac- tical guide for testers and agile teams. Pearson Education, 2009.[7] J. F. Smart, BDD in Action. Manning, 2014.[8] M. Gärtner, ATDD by example: a practical guide to acceptance test-driven development. Wesley, 2012.[9] M. Hüttermann, “Speci cation by example,” De- vOps for Developers, pp. 157–170, 2012.[10] W. Trumler and F. Paulisch, “How speci cation by example and test-driven development help to avoid technial debt,” in Managing Technical Debt (MTD), 2016 IEEE 8th International Workshop on. IEEE, 2016, pp. 1–8[11] C. Matts and G. Adzic, “Feature injec- tion: three steps to success,” 2011. [On- line]. Available: https://www.infoq.com/articles/ feature-injection-success[12] M. Wynne and A. Hellesoy, The cucumber book: behaviour-driven development for testers and de- velopers. Pragmatic Bookshelf, 2012.[13] R. Lawrence and P. Rayner, Behavior-Driven De- velopment with Cucumber. Pearson, 2016.[14] N. Li, A. Escalona, and T. Kamal, “Sky re: Model-based testing with cucumber,” in Software Testing, Veri cation and Validation (ICST), 2016 IEEE International Conference on. IEEE, 2016, pp. 393–400.[15] M. Rahman and J. Gao, “A reusable auto- mated acceptance testing architecture for mi- croservices in behavior-driven development,” in Service-Oriented System Engineering (SOSE), 2015 IEEE Symposium on. IEEE, 2015, pp. 321– 325.[16] S. Sivanandan et al., “Agile development cy- cle: Approach to design an e ective model based testing with behaviour driven automation frame- work,” in Advanced Computing and Communica- tions (ADCOM), 2014 20th Annual International Conference on. IEEE, 2014, pp. 22–25.[17] J. S. Dumas and J. Redish, A practical guide to usability testing. Ablex Pub. Corp., 1993.[18] J. Nielsen,” Why You Only Need to Test with 5 Users”, User Testing, in Nielsen Norman Group, 2000[19] S. Porru, A. Pinna, M. Marchesi, R. Tonelli, Blockchain-oriented software engineering: challenges and new directions. In Proceedings of the 39th International Conference on Software Engineering Companion, 2017, pp. 169-171[20] K. Benk, Test-driven development: by example. Addison-Wesley Professional, 2003[21] J. Nielsen, "10 usability heuristics for user interface design," Fremont: Nielsen Norman Group. [Consult. 20 maio 2014]. Disponível na Internet, 1995. 描述 碩士
國立政治大學
資訊科學系
105753028資料來源 http://thesis.lib.nccu.edu.tw/record/#G0105753028 資料類型 thesis dc.contributor.advisor 廖峻鋒 zh_TW dc.contributor.advisor Liao, Chun-Feng en_US dc.contributor.author (Authors) 鄭敬儒 zh_TW dc.contributor.author (Authors) Cheng, Ching-Ju en_US dc.creator (作者) 鄭敬儒 zh_TW dc.creator (作者) Cheng, Ching-Ju en_US dc.date (日期) 2018 en_US dc.date.accessioned 3-Jul-2018 17:31:21 (UTC+8) - dc.date.available 3-Jul-2018 17:31:21 (UTC+8) - dc.date.issued (上傳時間) 3-Jul-2018 17:31:21 (UTC+8) - dc.identifier (Other Identifiers) G0105753028 en_US dc.identifier.uri (URI) http://nccur.lib.nccu.edu.tw/handle/140.119/118272 - dc.description (描述) 碩士 zh_TW dc.description (描述) 國立政治大學 zh_TW dc.description (描述) 資訊科學系 zh_TW dc.description (描述) 105753028 zh_TW dc.description.abstract (摘要) 近年來區塊鏈技術受到相當重視,相關應用也開始大量被開發。智能合約是運行於區塊鏈上,用於執行業務、交易的重要元件。近年來多學者不約而同地發現,如何驗證智能合約正確與完整反映繁瑣的業務規則,是區塊鏈應用程式開發的重要議題。然而,目前針對此議題仍欠缺系統化整合驗證與測試機制來確保所開發智慧合約的正確性。針對此一挑戰,本研究主要目的在於探究如何將行為驅動開發製程應用於區塊鏈智能合約的整合測試,利用行為驅動開發結合測試驅動開發製成實際開發一個支援BDD開發方法的Solidity智能合約語言自動整合測試平台,並且在本論文中以紅利點數交換為案例作為示範。此外,本研究亦以購物網站之購物車需求作為案例,就所開發系統進行使用者質性測試,針對易用性進行檢驗,研究結果顯示,本研究提出的機制能有效降低智能合約開發測試複雜度與負擔,提升合約品質。 zh_TW dc.description.abstract (摘要) The importance of blockchain technologies and applications increases rapidly in recent years. A smart contract is a software component that encapsulates business and transaction logic of an application running on top of a blockchain network. Automatic integration testing and verification of smart contracts have become a vital software engineering issue of contract development. Nevertheless, there still lacks a systematic automated integration testing and verification mechanism. This thesis proposes a BDD-style automatic integration testing platform for Solidity–based smart contracts by considering the cross-cutting concerns of integration testing. Besides, this research has implemented a prototype system and a loyalty point exchanging scenario. The outcomes of this research are helpful for minimizing the cost and complexity of smart contract development and thus increase the quality of the blockchain applications. en_US dc.description.tableofcontents 摘要 IABSTRACT II目錄 III圖目錄 V表目錄 VII第1章 緒論 11.1研究背景 11.2研究動機 21.3研究目標 31.4 相關研究 4第2章 技術背景 62.1 技術背景 62.1.1 區塊鏈 (BLOCKCHAIN) 62.1.2測試驅動開發(TEST-DRIVEN DEVELOPMENT, TDD) 122.1.3行為驅動開發(BEHAVIOR-DRIVEN DEVELOPMENT, BDD) 13第3章 系統設計 193.1系統功能分析 203.2狀態引導 223.3樣板標記 (SKEKETON ANNOTATION) 233.4生成帶入 263.5 WEB APPLICATION PROGRAMMING INTERFACE (WEB API) 293.5.1 註冊帳戶 303.5.3 專案管理 313.5.4自動化整合測試 31第4章 系統實作 324.1 帳號管理 324.2 專案管理 334.2.1 查詢專案 334.2.2 新增專案 344.2.2 修改與刪除專案 354.2 規格寫作 354.3 單元測試寫作 364.4 合約寫作 36第5章 系統評估 385.1案例研討 385.2 質性使用者測試 425.2.1受測過程說明 425.2.2受測結果說明 445.2.3 改善與修正方向 46第六章 結論 49參考文獻 50附錄 53附錄一 相關發表著作 53附錄二 WEB API 說明 54 zh_TW dc.format.extent 2401106 bytes - dc.format.mimetype application/pdf - dc.source.uri (資料來源) http://thesis.lib.nccu.edu.tw/record/#G0105753028 en_US dc.subject (關鍵詞) 區塊鏈 zh_TW dc.subject (關鍵詞) 智能合約 zh_TW dc.subject (關鍵詞) 行為驅動開發 zh_TW dc.subject (關鍵詞) Blockchain en_US dc.subject (關鍵詞) Smart contract en_US dc.subject (關鍵詞) BDD en_US dc.title (題名) 基於行為驅動開發製程的區塊鏈智能合約整合測試 zh_TW dc.title (題名) A Study of BDD-style Smart Contract Integration Test on the Blockchain en_US dc.type (資料類型) thesis en_US dc.relation.reference (參考文獻) [1] N. Szabo, "Formalizing and securing relationships on public networks," First Monday, vol. 2, no. 9, 1997.[2] Nakamoto, Satoshi Bitcoin: A peer-to-peer electronic cash system. 2009.[3] K. Christidis and M. Devetsikiotis, "Blockchains and smart contracts for the internet of things," IEEE Access, vol. 4, pp. 2292–2303, 2016.[4] M. Swan, Blockchain: Blueprint for a new econ- omy. “O’Reilly Media, Inc.”, 2015.[5] D. Mamnani, “Testing of smart contracts in the blockchain world,” Blog post, 2017. [Online]. Available: https://www. capgemini.com/blog/capping-it-off/2017/01/ testing-of-smart-contracts-in-the-blockchain-world[6] L. Crispin and J. Gregory, Agile testing: A prac- tical guide for testers and agile teams. Pearson Education, 2009.[7] J. F. Smart, BDD in Action. Manning, 2014.[8] M. Gärtner, ATDD by example: a practical guide to acceptance test-driven development. Wesley, 2012.[9] M. Hüttermann, “Speci cation by example,” De- vOps for Developers, pp. 157–170, 2012.[10] W. Trumler and F. Paulisch, “How speci cation by example and test-driven development help to avoid technial debt,” in Managing Technical Debt (MTD), 2016 IEEE 8th International Workshop on. IEEE, 2016, pp. 1–8[11] C. Matts and G. Adzic, “Feature injec- tion: three steps to success,” 2011. [On- line]. Available: https://www.infoq.com/articles/ feature-injection-success[12] M. Wynne and A. Hellesoy, The cucumber book: behaviour-driven development for testers and de- velopers. Pragmatic Bookshelf, 2012.[13] R. Lawrence and P. Rayner, Behavior-Driven De- velopment with Cucumber. Pearson, 2016.[14] N. Li, A. Escalona, and T. Kamal, “Sky re: Model-based testing with cucumber,” in Software Testing, Veri cation and Validation (ICST), 2016 IEEE International Conference on. IEEE, 2016, pp. 393–400.[15] M. Rahman and J. Gao, “A reusable auto- mated acceptance testing architecture for mi- croservices in behavior-driven development,” in Service-Oriented System Engineering (SOSE), 2015 IEEE Symposium on. IEEE, 2015, pp. 321– 325.[16] S. Sivanandan et al., “Agile development cy- cle: Approach to design an e ective model based testing with behaviour driven automation frame- work,” in Advanced Computing and Communica- tions (ADCOM), 2014 20th Annual International Conference on. IEEE, 2014, pp. 22–25.[17] J. S. Dumas and J. Redish, A practical guide to usability testing. Ablex Pub. Corp., 1993.[18] J. Nielsen,” Why You Only Need to Test with 5 Users”, User Testing, in Nielsen Norman Group, 2000[19] S. Porru, A. Pinna, M. Marchesi, R. Tonelli, Blockchain-oriented software engineering: challenges and new directions. In Proceedings of the 39th International Conference on Software Engineering Companion, 2017, pp. 169-171[20] K. Benk, Test-driven development: by example. Addison-Wesley Professional, 2003[21] J. Nielsen, "10 usability heuristics for user interface design," Fremont: Nielsen Norman Group. [Consult. 20 maio 2014]. Disponível na Internet, 1995. zh_TW dc.identifier.doi (DOI) 10.6814/THE.NCCU.CS.001.2018.B02 -