# Pattern-Based Test Suite Reduction Method for Smart Contracts
## 2 Related Work
The mutation-based fault localization technique has high fault localization accuracy but it involves huge computational costs. [PERSON] et al. [20] showed a method of test case reduction that can limit about 56-88% costs while keeping fault localization precision. Another study where an evolutionary algorithm is applied to test suite reduction was conducted by [PERSON] et al. [21]. They have applied the NSGA-II algorithm to minimize test suites. They tested the approach on the Defects4j repository. Results show a test suite size reduction of 78% and a fault detection rate at the level of 95%. [PERSON] et al. [22] introduced the concept of test irreplaceability and applied it to traditional reduction algorithms. Their technique for greedy algorithms decreased the execution costs by 8-46%. Cost-aware techniques are closer to real-world software testing. However, the effectiveness of test reduction methods may depend on the complexity of the test suite. [PERSON] et al. [23] showed that the greedy algorithm using the irreplaceability metric lowers testing costs to a greater extent than a standard greedy algorithm. Another crucial quality is retaining the effectiveness of fault detection in the reduced test suite. [PERSON] et al. [24] applied fuzzy logic to test data. They presented a comparison of standard test reduction methods (HGS [25], GRE [26], Greedy algorithm [27]) with those using fuzzy logic. They have found that the execution time remains almost the same but the fault detection capability for the fuzzy GRE algorithm is greater by 6-7% than for the standard GRE algorithm. Some approaches apply two different test case reduction methods. [PERSON] et al. [28] arranged into a sequence GRE and ant colony algorithms. Work is underway to formulate algorithms that can calculate the optimal reduction in the test set. In that area, [PERSON] and [PERSON] [29] newly formulated the multi-criteria test suite minimization problem using integer linear programming. Test suite reduction is applied in regression test selection. [PERSON] et al. [30] have compared four Java-based test selection techniques: HyRTS, STARTS, OpenClover, and Ekstazi. The average reduction in test case numbers ranges from 86% to 98%. The fault detection ability is lower for the reduced test suite by 8.75% than the original test suite. However, the original test suite had to be obtained earlier and regression tests consider only changed source code. An interesting approach was proposed by [PERSON] et al. [31]. They introduced a Commit Adaptive Tool for Test suite Optimization (CATTO). Their framework implements test case selection for software written in Java in the form of a plug-in to IntelliJ IDEA. The tool can be executed before committing the changed code to the repository. There are also approaches that use models for test case selection. For example, [PERSON] et al. [32] derive test suites from Finite State Machines. The authors provided the Biased Mutual Information measure to maximize the diversity of test cases. Their approach reaches slightly worse coverage but is 10 times faster than the Test Set Diameter measure. Recently, Finite State Machine models have also been used by [PERSON] et al. [33]. Their research reveals that combining model-oriented testing and property-based testing requires a remarkably lower number of test cases in comparison to property-based testing alone. However, emerging technologies continue to pose new challenges. Smart contracts are a type of software that should remain unchanged from the moment of deployment. That is why so much attention is paid to their testing. In 2020, [PERSON] et al. [34] conducted a review on design and testing methods for smart contracts. As far as testing is concerned, they observed a lack of methods for assessing the quality of smart contracts. Since then, several works have been published in the area of smart contract testing presenting methods and developed tools. [PERSON] et al.