TY - GEN
T1 - DIRTS
T2 - 16th IEEE International Conference on Software Testing, Verification and Validation, ICST 2023
AU - Hundsdorfer, Simon
AU - Elsner, Daniel
AU - Pretschner, Alexander
N1 - Publisher Copyright:
© 2023 IEEE.
PY - 2023
Y1 - 2023
N2 - 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 1, 2 as an RTS tool that can either be used as a safety extension for existing RTS tools or as a standalone RTS solution.
AB - 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 1, 2 as an RTS tool that can either be used as a safety extension for existing RTS tools or as a standalone RTS solution.
KW - Software testing
KW - cross-language links
KW - dependency injection
KW - regression test selection
KW - static program analysis
UR - http://www.scopus.com/inward/record.url?scp=85161812275&partnerID=8YFLogxK
U2 - 10.1109/ICST57152.2023.00046
DO - 10.1109/ICST57152.2023.00046
M3 - Conference contribution
AN - SCOPUS:85161812275
T3 - Proceedings - 2023 IEEE 16th International Conference on Software Testing, Verification and Validation, ICST 2023
SP - 422
EP - 432
BT - Proceedings - 2023 IEEE 16th International Conference on Software Testing, Verification and Validation, ICST 2023
PB - Institute of Electrical and Electronics Engineers Inc.
Y2 - 16 April 2023 through 20 April 2023
ER -