Refactoring: improving the design of existing code
Refactoring: improving the design of existing code
Extreme programming explained: embrace change
Extreme programming explained: embrace change
Endo-testing: unit testing with mock objects
Extreme programming examined
Extended iterative maintenance life cycle using eXtreme programming
ACM SIGSOFT Software Engineering Notes
Hi-index | 0.00 |
Legacy code lacking unit tests is difficult to refactor. Without unit tests all changes to the code are dangerous. On the other hand in its unrefactored state the code lacks the modularity necessary for adding unit tests. Therefore, use Probe Tests. Probe tests are assertions placed in code which instead of crashing the program on failure simply log their success or failure to a file. The logged success or failure can then be presented through any xUnit framework. Probe tests balance these forces: time to recover from test failure, ease of parsing log files, difficulty of testing poorly refactored code, separation of production and test code.