Extreme Testing
Wednesday 9th of July 2025
So does anyone remember XP - or extreme programming? The rough idea being that you write some code and then push it live, learn some stuff, and then throw away what you wrote and then write it again given you have learned more things
Plenty of reasons why nobody (nobody I know anyway) does it today, but there are loads of good things that came out of this which are practiced
- small changesets
- test lots and upfront
- pair programming
- CI & CD
And these are now best practices rather than XP. And we're all much better with these changes, but we don't follow the delete and start again with code. We iterate typically instead.
Enter Extreme Testing - XT
In 2025 when it comes to testing there are a few things which are accepted wisdom
- TDD is hard, nobody completely TDDs
- Browser testing is flaky
- Unit testing coverage is stupid
- Integration tests are the holy grail
- Snapshot testing is next to worthless
But: what if XP got things write, but instead of being about code - it's about tests?
I've delete far more tests than I've written in my professional career. Lots of tests are hard to maintain, low value in what they cover, and are slow to run. And we as programmers have been trying to fix this for as long as I've been doing programming professionally (roughly 20 years). Instead these days - I delete tests. I have learned more about which tests are most valuable after a suite has been running in CI for a period. I have learned what bugs customers encounter and how our coverage sucks. I have learned how long they take to run. And if I encounter a failing test on my journey, I tend to delete it now
Now you've probably spotted the "problem" already, coverage drops and more bugs creep in. I can tell you that this has not been *MY* experience. You might also talk about refactoring. For this I turn to: snpshot tests. You know, the low value, low cost tests that aren't useful in the long run? Fabulous for a short term refactor. What about the complicated logic that this test covers? Delete that test too? No, of course now - I keep the valuable tests. But I generally go and ask instead: does this function/class do too much? What about instead splitting our logic and making our life easier. During this process the test usually splits and gets re-written also
And so we have Extreme Testing. Write tests, delete tests, replace tests. Most test suites don't add huge amounts of value over time. Be not afraid to remove tests which no longer add value, replace them instead with something cheaper and more useful. And notice write tests is still first, TDD is actually great! (But don't TDD everything too, and pseudo-code tests are a brilliant exercise and count towards TDD!)