
Stop Testing for Genius Hackers
You should stop writing unit tests for edge cases that don't exist. I spent three months testing what happens if someone pastes the entire Linux source code into a password field. Not a snippet - the whole kernel. I even wrote a custom validator that would gracefully handle kernel panics expressed in regex. The feature went live. Zero users tried it. Meanwhile, three users managed to lock themselves out by typing "password123" with caps lock on - a scenario I never tested because who does that? The real edge cases aren't the exotic ones you imagine. They're the boring failures that happen because humans are gloriously inconsistent. Like the user who copy-pasted their email address and accidentally included the "Sent from my iPhone" signature. Or the one who tried to register with their credit card number because the form was "asking for numbers." Your tests should cover what users actually do, not what you think they might do after three sleepless nights of paranoia. Test the three mos
Continue reading on Dev.to Webdev
Opens in a new tab



