As an automation tester, I’ve been spending the last two months or so refactoring tests I’ve written before, trying to make them more flexible to change (because tests do tend to change as user interfaces and business rules often get refined) and more efficient (because tests need to run as often as possible in a continuous integration software development environment), and with refactoring code I’ve been looking at what’s already been composed and asking myself if these tests continue to be relevant. It feels a lot like reflection; it reminds me of what I have, what I do with them, and why they exist. Sometimes there’s stuff that you don’t need anymore, other times there’s things you want to change for the better because you understand them better now than weeks, months, or years before. A few probably gets left alone as it is because you’ve come to terms of how they are and how they keep working for you, and you like them just like that.
And now I realize that I’ll do more refactoring as I add new tests to the suite and it will take up some of my time. Code reviews are vital, just like how necessary regular contemplation on one’s life are.