Chapter 14. Refactoring Test Code


Arie van Deursen, Leon Moonen, Alex van den Bergh, and Gerard Kok

Copyright © 2003, Arie van Deursen and Leon Moonen (CWI), Alex van den Bergh, and Gerard Kok (Software Improvement Group). All rights reserved.

Two key aspects of Extreme Programming (XP) are unit testing and merciless refactoring. Given the fact that the ideal test code/production code ratio approaches 1:1, it is not surprising that unit tests are being refactored. We found that refactoring test code is different from refactoring production code in two ways: (1) A distinct set of bad smells is involved, and (2) improving test code involves additional test-specific refactorings. To share our experiences with other XP practitioners, we describe a set of bad smells that indicates trouble in test code, and a collection of test refactorings to remove these smells.



Extreme Programming Perspectives
Extreme Programming Perspectives
ISBN: 0201770059
EAN: 2147483647
Year: 2005
Pages: 445

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net