$30 off During Our Annual Pro Sale. View Details »

Characterization tests

Characterization tests

Characterize your legacy code with junit rules.

A characterization test is a mean to describe (characterize) the actual behavior of an existing piece of software, and therefore protect existing behavior of legacy code against unintended changes via automated testing.

This term was coined by Michael Feathers and is extremelly useful when dealing with old, convoluted and beshitted systems.

When the best strategy is to keep it working, don’t open the pandora’s box - there are other ways to go. Not perfect, but good enough. In this short session, I’ll walk through the junit rules and show how we can leverage them to describe legacy code; define a pinching points, dump the logs and reason about the results.

All this based on some recent modifications to a JSP application, written in PHP, from times of JDK major 47 and early versions of Axis web services.

Jakub Marchwicki

January 30, 2015
Tweet

More Decks by Jakub Marchwicki

Other Decks in Technology

Transcript

  1. None
  2. None
  3. None
  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. None
  11. None
  12. None
  13. None
  14. None
  15. None
  16. None
  17. None
  18. None
  19. None
  20. None
  21. None
  22. None
  23. None
  24. None
  25. None
  26. None