1. Introduction
Code coverage is one of the most common test adequacy metrics [1], which is used to optimize tasks such as automated test generation [2] and prioritization [3]. However, the common code-based coverage metrics (e.g., statement and branch coverage) are weak criteria in evaluating a test case/suite in terms of detecting bugs. A covered statement in the source code is not necessarily bug free. Depending on which path the execution has taken to land on that statement, the behaviour of the system might be right (passing test case) or wrong (failing test case). This is referred to as path coverage. However, all-path coverage is usually not feasible, given that number of concrete execution paths is often too large (or even infinite). Recent studies propose to represent a test case with its entire execution path, abstracted at some level (to make it feasible), but still including the order of execution (e.g., as a sequence of method calls, the test covers at run-time) [4], [5]. To make the sequence length manageable, these approaches either cut-off the trace at a fix length or map the traces into a fixed-size vector space, for instance using a one-hot encoding approach [6] over all existing methods in that code base. In this paper, we propose a novel methodology to represent a test case as an abstract execution path. We then show how we can leverage such representation to prioritize test cases which outperforms existing test prioritization methods based on common code coverage metrics as well as state of the art alternatives to represent execution traces.