Smart Contracts are software programs that are deployed and executed within a blockchain infrastructure. Due to their immutable nature, directly resulting from the specific characteristics of the deploying infrastructure, smart contracts must be thoroughly tested before their release. Testing is one of the main activities that can help to improve the reliability of a smart contract, so as to possibly prevent considerable loss of valuable assets. It is therefore important to provide the testers with tools that permit them to assess the activity they performed. Mutation testing is a powerful approach for assessing the fault-detection capability of a test suite. In this paper, we propose SuMo, a novel mutation testing tool for Ethereum Smart Contracts. SuMo implements a set of 44 mutation operators that were designed starting from the latest Solidity documentation, and from well-known mutation testing tools. These allow to simulate a wide variety of faults that can be made by smart contract developers. The set of operators was designed to limit the generation of stillborn mutants, which slow down the mutation testing process and limit the usability of the tool. We report a first evaluation of SuMo on open-source projects for which test suites were available. The results we got are encouraging, and they suggest that SuMo can effectively help developers to deliver more reliable smart contracts.
翻译:智能合同是在一个链条基础设施内部署和执行的软件程序。 智能合同是其不可改变的性质, 直接由部署的基础设施的具体特点产生。 智能合同在发布之前必须经过彻底测试。 测试是有助于提高智能合同可靠性的主要活动之一, 从而有可能防止大量损失宝贵的资产。 因此, 必须向测试者提供工具, 使他们能够评估他们所从事的活动。 突变测试是评估测试套件的错误检测能力的一个强有力方法。 本文中, 我们提议 Sumo, 一种新颖的Etheum智能合同突变测试工具。 Sumo 安装了一套44个突变操作器, 由最新的实性文件设计, 以及众所周知的突变测试工具组成。 这可以模拟由智能合同开发者制造的各种错误。 操作者们的设计是为了限制生下来的变异体的生成, 减缓突变体的测试过程, 并限制该工具的可用性。 我们报告对Sumo的首次评估, 用于开放源项目, 这些变异变体操作者是从最新的开发者那里设计出来的。 我们得到了鼓励, 。