|
|
|
|
|
by MoreQARespect
217 days ago
|
|
>Reminds me of TDD bandwagon which was all the rage when I started programming. It took years to slowly die out and people realized how overhyped it really was. It never really went away. The problem is that there is a dearth of teaching materials telling people how to do it properly: * E2E test first * Write high level integration tests which match requirements by default * Only start writing lower level unit tests when a clear and stable API emerges. and most people when they tried it didn't do that. They mostly did the exact opposite: * Write low level unit tests which match the code by default. * Never write a higher level tests (some people don't even think it's possible to write an integration or e2e test with TDD because "it has to be a unit test"). |
|
For something complex, it’s kinda hard to write and debug high level tests when all the lower level functionality is missing and just stubbed out.
We don’t expect people to write working software that cannot be executed first, yet we expect people to write (and complete) all tests before the actual implementation.
Sure for trivial things, it’s definitely doable. But then extensive tests wouldn’t be needed for such either!
Imagine someone developing an application where the standard C library was replaced with a stub implementation… That wouldn’t work… Yet TDD says one should be able to do pretty much the same thing…