News

New Paper at ICST: DIRTS: Dependency Injection Aware Regression Test Selection


Authors: Hundsdorfer, S.*, Elsner, D.*, Pretschner, A.

Teaser: Regression test selection (RTS) aims to reduce regression testing effort by selecting only those tests that are affected by introduced changes. RTS techniques are considered to be safe if they select all affected test cases. Several supposedly safe RTS tools have been developed over the past decades, lately especially for Java projects. However, recent studies have shown that state-of-the-art RTS tools for Java can become unsafe when confronted with dependency injection (DI) mechanisms: despite the widespread use of DI frameworks in Java projects, no existing technique acknowledges DI-related changes. In this paper, we analyze the reasons behind unsafe RTS behavior for DI-related changes and develop DIRTS, a novel DI-aware RTS tool for Java. To counteract effects of DI on RTS, DIRTS efficiently analyzes source code annotations and metadata employed by popular DI frameworks, and generates a dependency graph including edges for dynamically injected objects. We evaluate DIRTS on 228 commits from 9 open-source Java projects that use DI. Our results indicate that in 33.3% of those commits DI-related changes affect some tests, and in 3.1% (7) DIRTS identifies affected tests that are clearly missed by the static RTS tool STARTS. Still, DIRTS is comparatively efficient and precise. We publish DIRTS as an RTS tool that can either be used as a safety extension for existing RTS tools or as a standalone RTS solution.