Abstract
In the context of refactoring, a unit test significantly differs from an ordinary client. A unit test is
the only safety net available to verify the impact of refactoring. In addition, tight coupling and
stronger association with the refactored class are its key discriminating characteristics. Hence, any
change in the code readily affects the behavior and quality of the test code. But if test code is adapted
and refactored along the production code, its behavior shall be preserved and quality may improve. In
this paper with the help of quality metrics, we establish the fact that unit test is a different type of
client that needs “special“ handling in the context of refactoring. We demonstrate through most
commonly used refactorings on an open source project that there is a need to enhance the existing
refactoring support for Java to include the specific adaptation mechanism for unit tests that eradicates
the effect of refactoring and also improves the internal structure of test code
W.Basit, F. Lodhi, F.Ahmed, M.U. Bhatti. (2013) A Metric Based Evaluation of Unit Tests as Specialized Clients in Refactoring, Pakistan Journal of Engineering and Applied Sciences, Volume 13, Issue 1.
-
Views
2008 -
Downloads
129
Next Article
Article Details
Volume
Issue
Type
Language