How to Test Legacy Code (Emily Bache)
Details
You need good tests before you can refactor legacy code. It’s easy to spend absolutely ages on that part. Unfortunately these kinds of unit tests often turn out to be not that useful and can miss refactoring mistakes you make. In this session I’d like to show another approach to writing tests for legacy code. I’ll demonstrate how it works using the Gilded Rose refactoring kata and explain the theory using Kent Beck’s test Desiderata.
Outline
- What is legacy code
- Writing unit tests for legacy code
- The tests you want to write and why you can’t
- Demo: Combination Approvals
- Theory: Composable and Specific Desiderata
- Conclusions
ABOUT EMILY
Emily Bache is an independent consultant, YouTuber and Technical Coach. She works with developers, training and coaching effective agile practices like Refactoring and Test-Driven Development. Emily has worked with software development for 25 years, written two books and teaches courses on platforms including Pluralsight and O'Reilly.
A frequent conference speaker, Emily has been invited to keynote at prestigious developer events including EuroPython, Craft and ACCU. Emily founded the Samman Technical Coaching Society in order to promote technical excellence and support coaches everywhere.
- LinkedIn: https://www.linkedin.com/in/emilybache/
- Twitter: [https://twitter.com/emilybache ](https://twitter.com/emilybache )
- GitHub: [https://github.com/emilybache ](https://github.com/emilybache )
- Mastodon: https://sw-development-is.social/web/@emilybache
- Website: [http://bacheconsulting.com/ ](http://bacheconsulting.com/ )
- Youtube: https://www.youtube.com/@EmilyBache-tech-coach