News for hackers. Stuff that matters.
Re:Is TDD Dead? (2014) by je42 on Wednesday August 26, 2020 @10:32AM (#24282818)
you do not want to delete tests that provide insight how your unit works internally.

If you were to delete these and you happen to have a regression, you need more time to analyse the faulty external behaviour and make conclusion about how the inner parts are working to produce the behaviour.

If you didn't write the code yourself, you might be in a situation that you will never able to be fix issue fully within reasonable time.

Side-note: I have seen these problems multiple times in production, where missing tests resulted in a large and expensive engineering effort to figure out the inner-mechanics of a particular piece of code.

Make sure you tests run (very) fast and are stable. Then there is little cost to pay to keep them around.

There are no comments on this comment yet.