A Metric Based Evaluation of Unit Tests as Specialized Clients in Refactoring

Authors

  • W. Basit
  • F. Lodhi
  • F. Ahmed
  • M. U. Bhatti

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.

References

J.R.Cannon, 1963. Determination of an unknown coefficient in parabolic differential equation, Duke Math J 30, 313-323.

J.R.Cannon and H.M.Yin, 1990. Numerial solution of some parabolic inverse problems, Numer Methods of Partial Differential equation 2,177-191.

Mehdi Deghan, 2005. Identification of a Time –dependent Coefficient in a partial differential equation subject to an Extra Measurment, Numer Methods Partial Differential Eq 21, 611-622.

M.A.Rana, Rashid Qamar, A.A. Farooq, A.M. Siddiqui. 2011. Finite-difference analysis of natural convection flow of viscous fluid in a porous channel with constant heat source, Applied Mathematics Letters 24, 2087-2092.

A.G. Fatuallyev, 2002. Numerical procedure for the determination of an unknown coefficient in Parabolic equation, Comput Phys Commum 144(1),29-33.

P.B.Patial and U.P.Verma. 2009. “Numerical Computational Method” Revised Edition, Narsoa.

R. L. Burden and J. D. Faires, 2011. “Numerical Analysis” 8th edition, PWS, Publishing company , Bostan.

M.K.Jain, 1991. “Numerical Solution of Differential Equations” 2nd edition, Willy Estern Limited.

Downloads

Published

2016-06-22

Issue

Section

Electrical Engineering and Computer Science