0Pricing
Objective-C iOS Development for Legacy & Enterprise Apps · Lesson

Writing Characterization Tests Before Refactoring

You cannot safely refactor untested legacy code. This lesson teaches characterization testing: capturing the current behavior of legacy Objective-C so refactors preserve it.

The Refactoring Dilemma

Refactoring should not change behavior, but legacy code often has no tests proving what its behavior even is. Characterization tests solve this.

What Is a Characterization Test

A characterization test documents the code as it actually behaves, not as it should behave. It pins current output so any change becomes visible.

All lessons in this course

  1. Refactoring Legacy Objective-C
  2. Managing Technical Debt
  3. Long-Term Maintenance Strategies
  4. Writing Characterization Tests Before Refactoring
← Back to Objective-C iOS Development for Legacy & Enterprise Apps