# Pattern-Based Test Suite Reduction Method for Smart Contracts
## 2 Related Work
[35] applied fuzz testing completed with dynamic taint analysis and targeted their approach on hard-to-cover branches. They tested the approach on sFuzz with over three thousand Ethereum smart contracts. They obtained an increase in the fault detection rate by 7% and a decrease in execution time by 11% in comparison to fuzzing alone. [PERSON] et al. [36] continued to work on improving fuzz testing. They raised the efficiency of the method by combining it with directed search. The developed tool Effuzz covers 35% more branches than sFuzz. The topic of fuzz testing has been also explored by [PERSON] et al. [37]. The method aims at cross-contract vulnerabilities and uses inter-contract data flow information. Their approach bytecode coverage is 10% higher than xFuzz and its vulnerability detection rate is almost two times larger than ConFuzzius. Many works are devoted to the topic of generating test cases for smart contracts. In that field, [PERSON] et al. [38] employed static analysis and dynamic search to generate test cases for smart contracts. They included the dependency among functions and state variables and used a genetic algorithm to obtain the test suite with significant branch coverage. Furthermore, [PERSON] et al. [39] have also combined two techniques: symbolic execution and mutation testing. Their conclusion on symbolic execution employed for the generation of test cases is negative. However, they have found that the selection of test cases by mutation testing can reduce the number of test cases. Coverage is another significant metric when testing smart contracts. In recent work, [PERSON] et al. [40] have considered branch coverage. They developed the Solidity Automated Test Suite GeneRation (SolAR) tool, which generates test suites employing genetic algorithms or fuzz testing. Besides, they treat operations in smart contracts from a new perspective of the pipeline. In that area, [PERSON] et al. [41] defined path-based test coverage criteria for smart contract testing. They have introduced notions of bounded transaction interaction and transaction basis path. Other authors incorporate various metrics into their methods. For example, [PERSON] et al. [42] developed the SynTest-Solidity framework for testing smart contracts. They exploit a genetic algorithm to generate test cases using function, line, and branch coverage metrics. The tool was run on twenty smart contracts, written in Solidity language, and reached 61% branch coverage in test suites for them. In their latest research, [PERSON] and [PERSON] [43] proposed an approach also exploiting a genetic algorithm, which automates the generation of test cases for smart contracts. The method improves coverage and reduces test suite execution time. Their method reached 98% of code coverage. Test suite generation took an average of 16 s, while test suite execution time was 25 s. [PERSON] et al. [44] applied taint analysis to discover the leakage of smart contract privileges. Their technique underlines the importance of white-box testing. They exploit the knowledge of used programming statements. In particular, the usage of the low-level Solidity _delegateCall_ function may compromise smart contract security. These types of techniques not only detect errors but also help improve the quality of the source code. In this area, the author of the article proposes a test suite reduction method for smart contracts that uses knowledge of variables and the processing mechanism. The article presents the full version of the method, which was initially published in communication as the Symmteric Test Pattern [7]. The method is intended for testing smart contracts whose implementation was realized in accordance with a specific design pattern [8]. On the one hand, this is a limitation because the scope of the method usage is limited to smart contracts following a specific template. On the other hand, it may be regarded as an advantage because the method is fully adapted to the employed implementation method.