DocumentCode
2672641
Title
Recovering traceability links between unit tests and classes under test: An improved method
Author
Qusef, Abdallah ; Oliveto, Rocco ; De Lucia, Andrea
Author_Institution
Dept. of Math. & Inf., Univ. of Salerno, Fisciano, Italy
fYear
2010
fDate
12-18 Sept. 2010
Firstpage
1
Lastpage
10
Abstract
Unit tests are valuable as a source of up-to-date documentation as developers continuously changes them to reflect changes in the production code to keep an effective regression suite. Maintaining traceability links between unit tests and classes under test can help developers to comprehend parts of a system. In particular, unit tests show how parts of a system are executed and as such how they are supposed to be used. Moreover, the dependencies between unit tests and classes can be exploited to maintain the consistency during refactoring. Generally, such dependences are not explicitly maintained and they have to be recovered during software development. Some guidelines and naming conventions have been defined to describe the testing environment in order to easily identify related tests for a programming task. However, very often these guidelines are not followed making the identification of links between unit tests and classes a time-consuming task. Thus, automatic approaches to recover such links are needed. In this paper a traceability recovery approach based on Data Flow Analysis (DFA) is presented. In particular, the approach retrieves as tested classes all the classes that affect the result of the last assert statement in each method of the unit test class. The accuracy of the proposed method has been empirically evaluated on two systems, an open source system and an industrial system. As a benchmark, we compare the accuracy of the DFA-based approach with the accuracy of the previously used traceability recovery approaches, namely Naming Convention (NC) and Last Call Before Assert (LCBA) that seem to provide the most accurate results. The results show that the proposed approach is the most accurate method demonstrating the effectiveness of DFA. However, the case study also highlights the limitations of the experimented traceability recovery approaches, showing that detecting the class under test cannot be fully automated and some issues are still under study.
Keywords
data flow analysis; program testing; public domain software; software maintenance; classes under test; data flow analysis; industrial system; last call before assert; naming convention; open source system; production code; programming task; refactoring; software development; testing environment; traceability link; traceability recovery; unit test; Accuracy; Context; Data mining; Documentation; Doped fiber amplifiers; Software; Testing; Empirical Studies; Traceability; Unit testing;
fLanguage
English
Publisher
ieee
Conference_Titel
Software Maintenance (ICSM), 2010 IEEE International Conference on
Conference_Location
Timisoara
ISSN
1063-6773
Print_ISBN
978-1-4244-8630-4
Electronic_ISBN
1063-6773
Type
conf
DOI
10.1109/ICSM.2010.5609581
Filename
5609581
Link To Document