Differences Between a Static and a Dynamic Test-to-Code Traceability Recovery Method

TitleDifferences Between a Static and a Dynamic Test-to-Code Traceability Recovery Method
Publication TypeJournal Article
Year of Publication2018
AuthorsGergely Tamás, Balogh G, Horváth F, Vancsics B, Beszédes Á, Gyimothy T
JournalSoftware Quality Journal
Volume27
Issue2
Pagination797-822
Date Published06/2019
KeywordsCode coverage, refactoring, select:quality, Structural test smells, Test-to-code traceability, Traceability link recovery, Unit testing
Abstract

Recovering test-to-code traceability links may be required in virtually every phase of development. This task might seem simple for unit tests thanks to two fundamental unit testing guidelines: isolation (unit tests should exercise only a single unit) and separation (they should be placed next to this unit). However, practice shows that recovery may be challenging because the guidelines typically cannot be fully followed. Furthermore, previous works have already demonstrated that fully automatic test-to-code traceability recovery for unit tests is virtually impossible in a general case. In this work, we propose a semi-automatic method for this task, which is based on computing traceability links using static and dynamic approaches, comparing their results and presenting the discrepancies to the user, who will determine the final traceability links based on the differences and contextual information. We define a set of discrepancy patterns, which can help the user in this task. Additional outcomes of analyzing the discrepancies are structural unit testing issues and related refactoring suggestions. For the static test-to-code traceability, we rely on the physical code structure, while for the dynamic, we use code coverage information. In both cases, we compute combined test and code clusters which represent sets of mutually traceable elements. We also present an empirical study of the method involving 8 non-trivial open source Java systems.

URLhttps://link.springer.com/article/10.1007/s11219-018-9430-x
DOI10.1007/s11219-018-9430-x
Page last modified: September 26, 2019