## 1 Introduction
Therefore, various test cases can be similar or redundant if they execute the same set of statements in the same order, regardless of the differences in the inputs used. It is normal for various test cases to often cover shared parts of the code structure during their execution. For this reason, measuring the similarity or the amount of shared code covered by different test cases can be helpful to the test engineer. Such a measurement can help select and prioritize the test cases based on various criteria. For example, the test engineer may be interested in identifying the root cause of a failure in one of the test cases. Identifying the test cases that may share the most amount of code coverage may help identify and select the set of test cases that are correlated to the failed test case and help in isolating the root cause of the bug. Additionally, in a tight schedule, ranking the test cases based on their similarities in terms of the amount of shared code coverage can help select a subset of test cases that may yield the maximal code coverage with the least amount of test cases. Moreover, it can help focus the testing effort on a specific part of the code where the set of test cases share a high percentage of the code structure. This paper introduces AbstractTrace, an approach that can assist in software testing to identify test-case similarities and classify its execution behavior. This study confirms the **hypothesis** that utilizing an execution trace facilitates the capture of source-code-level runtime event sequences for each test case. The employed monitoring and tracing framework supports over 120+ types of events. Capturing and recording these events promptly is expected to aid in identifying similarities across different test cases. AbstractTrace encodes each runtime event as one English character; these captured events form strings. In this paper, we use the Greek symbol \(\sum\) to denote the set of alphabetic characters used to encode each runtime event. A string can capture and represent the dynamic behavior of executing a test case based on the sequence of the covered source-code statements and structure. Different strings are captured for different test cases. The similarities between these strings reflect similarities in code coverage between various test cases. Building datasets of these string representations can be started during the validation of the test suite. Then, the dataset analysis should illustrate the similarities between the execution traces and their test cases. For example, one of the uses of this approach is in the context of regression testing, in which selecting an appropriate subset of the test cases to run after implementing new software features can enable test engineers to identify potential faults that may be introduced by these recent changes. However, selecting the subset of test cases to run can be challenging. Classifying and clustering the test cases can assist in the selection and prioritization process [11]. Therefore, this paper introduces an execution trace-based prioritization approach involving code coverage. The similarities between various traces are aligned with the similarities between test cases. This technique can be employed to help understand the execution behavior of a test suite, maximize the code coverage, and minimize the number of test cases. We evaluated various string-similarity algorithms and applied a similarity score-based method to identify similar test cases. Our approach is empirically evaluated using two case studies that use code coverage from runtime events and map the execution traces into the test cases of the investigated code. The results emphasize the value of automatic trace analysis and show the potential for the test-case prioritization and selection process based on execution traces. Furthermore, this paper investigates three levels of execution traces and evaluates various string-matching algorithms (_techniques_); each level gives different insights about the structure of the executed source code by the test case.