首页> 外文会议>IEEE/ACM International Conference on Program Comprehension >Towards Automated Testing of Blockchain-Based Decentralized Applications
【24h】

Towards Automated Testing of Blockchain-Based Decentralized Applications

机译:走向基于区块链的去中心化应用程序的自动化测试

获取原文

摘要

Blockchain-based decentralized applications (DApp) have been widely adopted in different areas and trusted by more and more users due to the fact that the back end code of a DApp is publicly run on the blockchain and cannot be modified implicitly. However, there are few effective methods and tools for testing DApps and bugs can be easily introduced by inexperienced developers. The existing testing techniques either focus on testing front-end programs or back-end code but ignore the interaction between them, which makes it difficult to apply the techniques directly on DApp. In this paper, we present an automated testing technique for DApps which works in a two-phase manner. First, we employ random events to infer an abstract relation between browser-side events and blockchain-side contracts. Second, our technique generates a set of test cases under the guidance of inferred relations and orders the test cases based on a read-write graph. We also use taint analysis to track data flow of the smart contract and feed it to the generation procedure for following test cases. We have developed a tool called Sungari to implement our approach, and evaluated it on representative real-world DApps. The preliminary evaluation results demonstrated the potential of Sungari in achieving a significant optimization compared to random testing approaches.
机译:基于区块链的去中心化应用程序(DApp)已在不同领域得到广泛采用,并且由于DApp的后端代码在区块链上公开运行并且不能隐式修改,因此受到越来越多用户的信任。但是,几乎没有有效的方法来测试DApp,并且没有经验的开发人员可以轻松地引入bug。现有的测试技术要么专注于测试前端程序或后端代码,要么忽略它们之间的交互,这使得将这些技术直接应用于DApp变得困难。在本文中,我们提出了一种针对DApp的自动化测试技术,该技术以两阶段的方式工作。首先,我们采用随机事件来推断浏览器端事件和区块链端合同之间的抽象关系。其次,我们的技术在推断关系的指导下生成了一组测试用例,并根据读写图对测试用例进行排序。我们还使用异味分析来跟踪智能合约的数据流,并将其提供给后续测试用例的生成过程。我们开发了一个名为Sungari的工具来实施我们的方法,并在具有代表性的真实DApp中对其进行了评估。初步评估结果表明,与随机测试方法相比,Sungari具有实现重大优化的潜力。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号