TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Software Testing Anti-Patterns

3 pointsby kiyanwang4 months ago

1 comment

BobbyTables24 months ago
I feel unit tests suck when there is a complex external entity (database, etc).<p>Sure, one can mock the thing and test that an expected series of queries were made. But if one can confidently claim those expected queries always match the desired behavior, then the original code was probably already correct.<p>It’s too easy to just write “dumb” unit tests that merely confirm the code still executes the same inscrutable sequence of things it did when the test was first written…<p>Writing useful unit tests is often much harder…