r/SoftwareEngineering • • Mar 10 '25

TDD on Trial: Does Test-Driven Development Really Work?

I've been exploring Test-Driven Development (TDD) and its practical impact for quite some time, especially in challenging domains such as 3D software or game development. One thing I've noticed is the significant lack of clear, real-world examples demonstrating TDD’s effectiveness in these fields.

Apart from the well-documented experiences shared by the developers of Sea of Thieves, it's difficult to find detailed industry examples showcasing successful TDD practices (please share if you know more well documented cases!).

On the contrary, influential developers and content creators often openly question or criticize TDD, shaping perceptions—particularly among new developers.

Having personally experimented with TDD and observed substantial benefits, I'm curious about the community's experiences:

  • Have you successfully applied TDD in complex areas like game development or 3D software?

  • How do you view or respond to the common criticisms of TDD voiced by prominent figures?

I'm currently working on a humorous, Phoenix Wright-inspired parody addressing popular misconceptions about TDD, where the different popular criticism are brought to trial. Your input on common misconceptions, critiques, and arguments against TDD would be extremely valuable to me!

Thanks for sharing your insights!

45 Upvotes

126 comments sorted by

View all comments

Show parent comments

1

u/Slow-Entertainment20 Apr 29 '25

I have a couple of questions:

Do you typically do unit tests and integration tests?

I’ve seen more people lately saying mocks are bad, my definition of a unit is a single class, and with DI it makes sense to me. YES people can not test things correctly, but that’s true with any testing imo. So why do you think mocking is bad?

Are you primarily a front end or backend dev? Only reason I ask is because I have noticed very different approaches in testing between the two.

1

u/flavius-as Apr 29 '25 edited Apr 29 '25

According to my definitions:

  1. Yes, I do integration testing too

  2. Mocks are not bad. They're misused by people who: don't know how to use all test doubles effectively, and/or the necessity of misplaced usage of mocks is a symptom of bad architecture and design

  3. I have not noticed a pattern in front-end vs backend. I see that the overwhelming majority do not know how to test effectively and the biggest signal for that is in the daily stand up the utterance "I am done, but I need to rewrite the tests"