arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2006.01476cs.SE
收藏

Kaya:一个基于区块链的去中心化应用测试框架

Kaya: A Testing Framework for Blockchain-based Decentralized Applications

Zhenhao Wu, Jiashuo Zhang, Jianbo Gao, Yue Li, Qingshan Li, Zhi Guan, Zhong Chen

摘要:

近年来,开发了许多基于区块链(DApp)的去中心化应用程序。然而,由于测试不充分,DApp很容易暴露出严重的漏洞。我们发现DApp测试的三个主要挑战,即,DApp固有的复杂性,不方便的预状态设置,以及不可读的日志。在本文中,我们提出了一个名为Kaya的测试框架来弥合这些差距。Kaya有三个主要功能。首先,Kaya提出了DApp行为描述语言(DBDL),使编写测试用例变得更容易。用DBDL编写的测试用例也可以由Kaya自动执行。其次,Kaya为测试工程师提供了一种灵活方便的方式来轻松设置区块链预状态。第三,Kaya将不可理解的地址转换为可读的变量,以便于理解。通过这些功能,Kaya可以帮助测试工程师更轻松地测试DApps。此外,为了适应不同的应用环境,我们为测试工程师提供了两种使用Kaya的方法,即,UI和命令行。我们的实验案例展示了Kaya在帮助测试工程师更轻松地测试DApps方面的潜力。

英文摘要:

In recent years, many decentralized applications based on blockchain (DApp) have been developed. However, due to inadequate testing, DApps are easily exposed to serious vulnerabilities. We find three main challenges for DApp testing, i.e., the inherent complexity of DApp, inconvenient pre-state setting, and not-so-readable logs. In this paper, we propose a testing framework named Kaya to bridge these gaps. Kaya has three main functions. Firstly, Kaya proposes DApp behavior description language (DBDL) to make writing test cases easier. Test cases written in DBDL can also be automatically executed by Kaya. Secondly, Kaya supports a flexible and convenient way for test engineers to set the blockchain pre-states easily. Thirdly, Kaya transforms incomprehensible addresses into readable variables for easy comprehension. With these functions, Kaya can help test engineers test DApps more easily. Besides, to fit the various application environments, we provide two ways for test engineers to use Kaya, i.e., UI and command-line. Our experimental case demonstrates the potential of Kaya in helping test engineers to test DApps more easily.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑