Johan Martinsson & Remy Sanlaville – 100% Confident with Legacy Code
Frustrated you can’t refactor that piece of un-SOLID SH*T because you don’t have tests and it takes too long to write them?
Learn how to write non regression tests super-fast! We’ll work in *baby steps* on a real world application with complex logic and untestable dependencies. We introduce a powerful emerging concept of writing temporary tests that are tailored only for refactoring. It builds upon the techniques Golden Master and approval testing. We show how those work in a world of side effects and untestable dependencies. You’ll also get an understanding of how to apply this approach at any level of testing. We’ll discuss how this goes hand-in-hand with traditional system testing and the practice of TDD.
Find the setup instructions here.
Alose please find a video here about the session.
Demo: Test 200 lines of code in 5 minutes!
Baby steps (Short intro + Do It Yourself):
- String comparison with ApprovalTests
- Branch coverage by input parameter variation
- Serializing a complex type
- Mocking web services
- Capturing side effects
What you will learn?
How quickly protect major refactorings
- Gain time by not writing assertions
- Elegantly mock entire webservers
- Deal with side effects
- Generate input arguments
Developers with some TDD experience. Java, IDE with code coverage. Clone and build project
ApprovalTests – blog, FAQ and doc http://approvaltests.sourceforge.net/
UI visual diffing -
Working Effectively with Legacy Code – in particular for creating “seams”
Do the attendees need a laptop?
Yes.But you can probably find a pair to work with.