DIRTS: Dependency Injection Aware Regression Test Selection

Simon Hundsdorfer, Daniel Elsner, Alexander Pretschner

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

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.

Original languageEnglish
Title of host publicationProceedings - 2023 IEEE 16th International Conference on Software Testing, Verification and Validation, ICST 2023
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages422-432
Number of pages11
ISBN (Electronic)9781665456661
DOIs
StatePublished - 2023
Event16th IEEE International Conference on Software Testing, Verification and Validation, ICST 2023 - Dublin, Ireland
Duration: 16 Apr 202320 Apr 2023

Publication series

NameProceedings - 2023 IEEE 16th International Conference on Software Testing, Verification and Validation, ICST 2023

Conference

Conference16th IEEE International Conference on Software Testing, Verification and Validation, ICST 2023
Country/TerritoryIreland
CityDublin
Period16/04/2320/04/23

Keywords

  • Software testing
  • cross-language links
  • dependency injection
  • regression test selection
  • static program analysis

Fingerprint

Dive into the research topics of 'DIRTS: Dependency Injection Aware Regression Test Selection'. Together they form a unique fingerprint.

Cite this