DEV Community

Discussion on: Pitch me on Java

 
leob profile image
leob

Ah right, interesting article ...

The problem is the misconception that all tests must be "unit" tests in a pure sense - no database, no I/O, only calculations ... that's of course nonsense and impractical, and that's not what TDD says.

If you accept that a large part (the largest part) of your tests just execute web requests (but without talking to a real web server over the network), and use a (test) database, then TDD can still be applied perfectly well without having to use Hexagonal or such extreme stuff.

So I'd say don't blame TDD, blame people who don't understand how to implement it in a practical way. Oh and Hexagonal Architecture is cool and interesting, and very relevant ... for less than 5% of all apps/systems ;)

(the 5% is almost certainly an exaggeration)