# Pattern-Based Test Suite Reduction Method for Smart Contracts
## 2 Related Work  
Related work covers general-purpose methods used for test suite reduction. Additionally, this section also discusses the methods used to verify blockchain smart contracts, in particular, limiting test suites. The area of software assessment is inextricably linked to requirements and both of these topics have already been regulated in ISO/IEC 25010:2023 standard [9]. A similar view on the topic is presented by [PERSON] et al. [10] who summarized the testing theory and defined the notion of a complete test suite regarding the requirements. A test suite can be regarded as complete when it allows to precisely deter mine the correctness of the implemented software following the specification. In addition, they also defined testability. According to them, testability means the size of the complete test suite. [PERSON] and [PERSON] [11] used the notion of a representative set of test cases which is a subset of the original test suite. A representative test suite must meet the same testing goal as the initial test suite. An important type of test reduction method is merging similar test cases. In that field, [PERSON] et al. [12] showed a method of discarding and merging redundant test cases while ensuring the same coverage as the original database test suite. Adaptive Random Testing is a fundamental black-box software testing technique. [PERSON] et al. [13] proposed a method that reduces the scope of the randomly generated test suite. At the same time, the method proposes new candidate test cases that resemble the previously executed test cases less. Generally, the random testing techniques are criticized for not using the information of the software code. Another black-box technique is the evolutionary search genetic algorithm. [PERSON] et al. [14] proposed the AST-based Test case Minimizer that uses only the test case source code and applies more detailed similarity to achieve superior fault detection. A test case code is transformed into abstract syntax trees and employs four similarity measures. The method aims to reach a high fault detection for Java projects. Testing of programs written in Java language has also been the subject of study by [PERSON] et al. [15]. They have proposed the Java Test Suite Reduction framework. The tool uses method, line, and checked coverage metrics to generate reduced test suites. The newest metric, checked coverage, considers only executed statements used by the test oracle to evaluate the test condition. However, line coverage used with the Harrold-Gupta-Soffa (HGS) algorithm appeared in their research as the most promising. The average reduction factor for greedy approaches ranges from 58% to 77%. An important criterion for assessing the effectiveness of a test suite is code coverage. Recently, [PERSON] et al. [16] proposed a statement frequency coverage criterion. They have shown that their criterion outperforms well-established statement and branch coverage criteria in evaluating test suite efficacy. Some authors combine various criteria to remove redundant test cases. For example, [PERSON] et al. [17] applied the K-means algorithm to cluster similar test cases and then the evolutionary algorithm to get rid of surplus test cases. They used criteria related to coverage, fault, and cost. The reduction ratio that they managed to obtain ranges from 4.10% to 10.64%. The test suite reduction process may induce a substantial computational cost and can be time-consuming. [PERSON] and [PERSON] [18] proposed a technique that speeds up test case reduction by skipping even syntactically valid test cases, which are improbable to reproduce the failure. In reducing test suites, [PERSON] et al. [19] considered three objectives in their multi-objective evolutionary algorithm. They employed source code and requirements coverage, but also execution time. Their method was applied to Java applications and the time of reduction approach ranged from 0.2 s to 14 min (2.7 s on average).