• DocumentCode
    3696666
  • Title

    Automatically identifying focal methods under test in unit test cases

  • Author

    Mohammad Ghafari;Carlo Ghezzi;Konstantin Rubinov

  • Author_Institution
    DeepSE Group at DEIB, Politecnico di Milano, Italy
  • fYear
    2015
  • Firstpage
    61
  • Lastpage
    70
  • Abstract
    Modern iterative and incremental software development relies on continuous testing. The knowledge of test-to-code traceability links facilitates test-driven development and improves software evolution. Previous research identified traceability links between test cases and classes under test. Though this information is helpful, a finer granularity technique can provide more useful information beyond the knowledge of the class under test. In this paper, we focus on Java classes that instantiate stateful objects and propose an automated technique for precise detection of the focal methods under test in unit test cases. Focal methods represent the core of a test scenario inside a unit test case. Their main purpose is to affect an object´s state that is then checked by other inspector methods whose purpose is ancillary and needs to be identified as such. Distinguishing focal from other (non-focal) methods is hard to accomplish manually. We propose an approach to detect focal methods under test automatically. An experimental assessment with real-world software shows that our approach identifies focal methods under test in more than 85% of cases, providing a ground for precise automatic recovery of test-to-code traceability links.
  • Keywords
    "Testing","Maintenance engineering","Software","Debugging","Object oriented modeling","Java","Production"
  • Publisher
    ieee
  • Conference_Titel
    Source Code Analysis and Manipulation (SCAM), 2015 IEEE 15th International Working Conference on
  • Type

    conf

  • DOI
    10.1109/SCAM.2015.7335402
  • Filename
    7335402