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.

Why should we even do testing?

3 pointsby yoouareperfectabout 3 years ago

1 comment

nh23423fefeabout 3 years ago
A good test suite shows the right &quot;perspective&quot; to have on code. All code is read 100x more than written. But most code is written in a way that doesn&#x27;t encode enough context.<p>Class hierarchies, method layout, pattern use. These things are all invisible at a high level, but testing can make those patterns surface easily and can encodes lots of semantic expectations about what the code is for.<p>It&#x27;s much easier to make a change when you can force a test to fail and single step through the test, rather than setup a local environment, try to create a reproduction and then setup a trail of breakpoints to get the system into some &quot;known&quot; state.