This happens to me, that I test for the wrong thing. But it happened to me a lot more often when I started testing but before adopting TDD.

It’s not enough for the test to fail, it should fail for the right reason. You can always write a test that fails depending on a pseudorandom number. That does nothing to discredit TDD.


is a composer and photographer from Detroit, Michigan. He has been working on a Java program to display certain mathematical diagrams.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store