Refactoring: Test Vices
Hi Folks,
Today we’ve got a blog post on a refactoring tool we’ve been using at Gusto we call a Test Vice.
A Test Vice is a suite of tests meant to be thrown away. It’s a temporary piece of code designed to give you peace of mind while refactoring. Test Vices are very similar to Pinning Tests, except Test Vices are designed to lock down all existing behavior, not just some.
We use Test Vices at Gusto to prevent regressions in mission-critical pieces of code. Hopefully you can employ a Test Vice in a future project.
Special thanks to Iheanyi Ekechukwu, Justin Duke, Sihui Huang and Sam Soffes for providing feedback on early drafts of this post.
Don't miss what's next. Subscribe to Kelly Sutton’s Newsletter: