TE-TCP-Net: Parallel Transformer-Encoders for Test Case Prioritization
Continuous integration (CI) environments are increasingly challenged by the rapid growth in test cases and code changes, rendering exhaustive regression testing impractical. In our previous work [1], [2], we introduced TCP-Net and TCP-Net++, deep neural network models for test case prioritization that showed promising improvements in fault detection. However, these models struggled to fully capture the sequential dependencies inherent in evolving CI systems. In this paper, we present TE-TCP-Net, a novel transformer-based model that leverages parallel transformer encoders to dynamically learn from historical test execution data, source code modifications, and test case characteristics. By effectively modeling sequential relationships across multiple CI builds, TE-TCP-Net achieves superior performance in terms of Average Percentage of Faults Detected (APFD) and Normalized APFD (NAPFD) compared to state-of-the-art methods. The results show that TE-TCP-Net is very effective, indicating its potential for practical usage in real-world scenarios. We validate our approach on two industrial datasets, Calibre PERC and Calibre xRC, where TE-TCP-Net significantly improves early fault detection and overall testing efficiency, establishing a new benchmark for test case prioritization in dynamic CI environments.