Learning Test

I can't believe this page didn't exist already.

Maybe that's because the term is not in wide use. MichaelFeathers calls this a CharacterizationTest. It's very useful when getting ready to refactor some LegacyCode that is not yet covered by tests. (Yes, that's a tautology.)

When developing with a new API, write a test that verifies your expectation of how that API will behave.

MikeClark has written about his RubyLanguage set of LearningTest -- JamesAbley

I think the terms are distinct. I've read MichaelFeathers book now (highly recommended, I showed it to my CEO, but I don't think he got what I was getting at!) and I tend to do LearningTest[s] to explore a problem domain - not necessarily as a precursor to refactoring. The example given about MikeClark is something that is documenting knowledge about a system as per CharacterizationTest[s], but those would typically be put in place as a safety net when refactoring. With LearningTest, there is no intent to refactor - just document.

-- JamesAbley


View edit of September 30, 2014 or FindPage with title or text search