Testing Unfriendly Code - a crash course in stunt programming
von Nicholas Clark (London.pm)
Testing Unfriendly Code - a crash course in stunt programming richtet sich an Alle und wird in English gehalten. Der Talk beginnt am 17.04.2024 um 10:00 Uhr und dauert 40 Minuten. Er findet im Raum 1 statt.
At my employer we have of batch scripts, which were written ages ago, do their thing wonderfully, and reliably earn their keep month in month out.
Problem is, that we want to edit some of them. They don't have tests. They were never written with testing in mind. We'd need to refactor them to easily write tests for them, but we don't want to refactor them *until* we have tests.
How do we solve this conundrum?
This talk will explain the techniques we developed to run scripts in testing byte-for-byte unchanged, but with code injected so that we could subvert the control flow to write thorough tests.
Don't do this at home.
Don't do this in production.
Don't do this in new code.
Don't do this for any longer than you have to.
Tags: testing
Teilnahmeinteresse: