Analysis of static and dynamic test-to-code traceability information

Tamás Gergely, Gergő Balogh, F. Horváth, Béla Vancsics, A. Beszédes, T. Gyimóthy

Research output: Contribution to journalArticle

Abstract

Unit test development has some widely accepted guidelines. Two of them concern the test and code relationship, namely isolation (unit tests should examine only a single unit) and separation (they should be placed next to this unit). These guidelines are not always kept by the developers. They can however be checked by investigating the relationship between tests and the source code, which is described by test-to-code traceability links. Still, these links perhaps cannot be inferred unambiguously from the test and production code. We developed a method that is based on the computation of traceability links for different aspects and report Structural Unit Test Smells where the traceability links for the different aspects do not match. The two aspects are the static structure of the code that reflects the intentions of the developers and testers and the dynamic coverage which reveals the actual behavior of the code during test execution. In this study, we investigated this method on real programs. We manually checked the reported Structural Unit Test Smells to find out whether they are real violations of the unit testing rules. Furthermore, the smells were analyzed to determine their root causes and possible ways of correction.

Original languageEnglish
Pages (from-to)903-919
Number of pages17
JournalActa Cybernetica
Volume23
Issue number3
DOIs
Publication statusPublished - Jan 1 2018

Fingerprint

Traceability
Testing
Unit
Isolation
Coverage
Roots

Keywords

  • Code coverage
  • Refactoring
  • Test smells
  • Test-to-code traceability
  • Unit testing

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Software
  • Computer Science (miscellaneous)
  • Computer Vision and Pattern Recognition
  • Management Science and Operations Research
  • Information Systems and Management
  • Electrical and Electronic Engineering

Cite this

Analysis of static and dynamic test-to-code traceability information. / Gergely, Tamás; Balogh, Gergő; Horváth, F.; Vancsics, Béla; Beszédes, A.; Gyimóthy, T.

In: Acta Cybernetica, Vol. 23, No. 3, 01.01.2018, p. 903-919.

Research output: Contribution to journalArticle

Gergely, Tamás ; Balogh, Gergő ; Horváth, F. ; Vancsics, Béla ; Beszédes, A. ; Gyimóthy, T. / Analysis of static and dynamic test-to-code traceability information. In: Acta Cybernetica. 2018 ; Vol. 23, No. 3. pp. 903-919.
@article{9ca0e838737146a8863ce7903b4bf1d3,
title = "Analysis of static and dynamic test-to-code traceability information",
abstract = "Unit test development has some widely accepted guidelines. Two of them concern the test and code relationship, namely isolation (unit tests should examine only a single unit) and separation (they should be placed next to this unit). These guidelines are not always kept by the developers. They can however be checked by investigating the relationship between tests and the source code, which is described by test-to-code traceability links. Still, these links perhaps cannot be inferred unambiguously from the test and production code. We developed a method that is based on the computation of traceability links for different aspects and report Structural Unit Test Smells where the traceability links for the different aspects do not match. The two aspects are the static structure of the code that reflects the intentions of the developers and testers and the dynamic coverage which reveals the actual behavior of the code during test execution. In this study, we investigated this method on real programs. We manually checked the reported Structural Unit Test Smells to find out whether they are real violations of the unit testing rules. Furthermore, the smells were analyzed to determine their root causes and possible ways of correction.",
keywords = "Code coverage, Refactoring, Test smells, Test-to-code traceability, Unit testing",
author = "Tam{\'a}s Gergely and Gergő Balogh and F. Horv{\'a}th and B{\'e}la Vancsics and A. Besz{\'e}des and T. Gyim{\'o}thy",
year = "2018",
month = "1",
day = "1",
doi = "10.14232/actacyb.23.3.2018.11",
language = "English",
volume = "23",
pages = "903--919",
journal = "Acta Cybernetica",
issn = "0324-721X",
publisher = "University of Szeged",
number = "3",

}

TY - JOUR

T1 - Analysis of static and dynamic test-to-code traceability information

AU - Gergely, Tamás

AU - Balogh, Gergő

AU - Horváth, F.

AU - Vancsics, Béla

AU - Beszédes, A.

AU - Gyimóthy, T.

PY - 2018/1/1

Y1 - 2018/1/1

N2 - Unit test development has some widely accepted guidelines. Two of them concern the test and code relationship, namely isolation (unit tests should examine only a single unit) and separation (they should be placed next to this unit). These guidelines are not always kept by the developers. They can however be checked by investigating the relationship between tests and the source code, which is described by test-to-code traceability links. Still, these links perhaps cannot be inferred unambiguously from the test and production code. We developed a method that is based on the computation of traceability links for different aspects and report Structural Unit Test Smells where the traceability links for the different aspects do not match. The two aspects are the static structure of the code that reflects the intentions of the developers and testers and the dynamic coverage which reveals the actual behavior of the code during test execution. In this study, we investigated this method on real programs. We manually checked the reported Structural Unit Test Smells to find out whether they are real violations of the unit testing rules. Furthermore, the smells were analyzed to determine their root causes and possible ways of correction.

AB - Unit test development has some widely accepted guidelines. Two of them concern the test and code relationship, namely isolation (unit tests should examine only a single unit) and separation (they should be placed next to this unit). These guidelines are not always kept by the developers. They can however be checked by investigating the relationship between tests and the source code, which is described by test-to-code traceability links. Still, these links perhaps cannot be inferred unambiguously from the test and production code. We developed a method that is based on the computation of traceability links for different aspects and report Structural Unit Test Smells where the traceability links for the different aspects do not match. The two aspects are the static structure of the code that reflects the intentions of the developers and testers and the dynamic coverage which reveals the actual behavior of the code during test execution. In this study, we investigated this method on real programs. We manually checked the reported Structural Unit Test Smells to find out whether they are real violations of the unit testing rules. Furthermore, the smells were analyzed to determine their root causes and possible ways of correction.

KW - Code coverage

KW - Refactoring

KW - Test smells

KW - Test-to-code traceability

KW - Unit testing

UR - http://www.scopus.com/inward/record.url?scp=85052407712&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=85052407712&partnerID=8YFLogxK

U2 - 10.14232/actacyb.23.3.2018.11

DO - 10.14232/actacyb.23.3.2018.11

M3 - Article

AN - SCOPUS:85052407712

VL - 23

SP - 903

EP - 919

JO - Acta Cybernetica

JF - Acta Cybernetica

SN - 0324-721X

IS - 3

ER -