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 comment

2

u/Aer93 Mar 13 '25

First of all, thank you for sharing your personal experience! It's great to hear for someone who knew people from the Sea of Thieves team. I cited them as an example of the rare cases of groups who attempted to apply TDD, but I don't think they are a a gold standard at all. I got at least that impression from their talks, it felt to me that even during the talks they were missing some core ideas and they discovered them through out the project (for example, I find it quite shocking how much their code was tied to Unreal Engine, and they had to find very inefficient solutions to make their tests run fast), that's why their talks are so inspiring too. Nevertheless, the benefits of TDD come over time, the longer you practice it, it's a self improving process. As you mention, if you are not planning to work long term within a framework or industry, it's just makes you slow and you never see the dividens of it.

I don't agree with the "TDD is not a good fit when the code tends to be more high FAN-OUT, typically more "integration testing" heavy,". You can always design your system so that it's easier to test, you only face that situation when the design has come first, and then you are thinking, oh wao, this is very branched out and so difficult to test because there are so many different paths.

> Strict adherence to TDD can cripple iteration time which is necessary for game development.

Only in the beginning of your TDD journey! I swear, entering play mode and manual testing what you develop is so much slower than running tests, and the worst of it is that it's a fixed paradigm, you click play and you manually play the game to test your code, you can never improve the workflow, so you will never be any more productive. Plus you will see your whole game butting up so many times...

Anyways, thank you again for sharing your view!