logoalt Hacker News

2,085 Tests, and None of Them Opens the Front Door

4 pointsby awefullast Thursday at 10:50 AM9 commentsview on HN

Comments

perrygeolast Thursday at 12:05 PM

Anecdote time: I worked on a project with a senior dev who was really into unit testing and only unit testing. The software had to be fully tested as tiny little lego bricks with mocks galore. Because "if all the pieces were correct, the combination had to be correct" - his words. (I guess he'd never considered emergent behavior)

I'll never forget the cycle, after staunch objections to integration/e2e/manual tests and zealously insisting on full unit test coverage, the senior dev deployed changes ... boom. The process failed hard minutes after start because there was a bug in main. Full production outage. A bug so obvious we should have caught it by eye. Clearly, in the weeks developing the feature, he had never bothered to even run the application. Each part was fully polished in isolation but utterly failed when integrated into an application.

The way I've come to think of it: Unit tests are for libraries, a closed world where you can neatly define all inputs and outputs. Integration/E2E tests are for applications, an open world which require systems thinking, simulations not proofs. Know which world you're working in!

show 2 replies
netsharcyesterday at 11:37 PM

Skimmed through this. One heading is "The gap was never coverage. It was wiring.". Smeḷls very AI sloppy, won't bother reading...

I used to read anything and everything on HN, but my allergy to slop has made me stop doing that. I suppose that's a good thing?

show 2 replies
KenPainterlast Thursday at 11:11 AM

Your Website seems to be messing with browser history. Back button will not take you back to HN.

lloydatkinsontoday at 1:19 AM

> Opens the front door

This is the most recent AI slop phrase the models produce, keep an eye out you'll see it everywhere.

show 1 reply
awefullast Thursday at 10:50 AM

[dead]