Integration tests are best tests
jayconrod.com·5d·
🧪Testing
Preview
Report Post

I’d like to share an unpopular opinion about testing: integration tests are the most important kind of tests: you should strive for excellent integration test coverage and invest relatively little time in unit tests. I’ve believed this since I worked on cmd/go, Go’s build tool. We had a really excellent set of integration tests that were easy to write, quick to run, and reliable and finding regressions.

This goes against the conventional wisdom that you should have thorough unit test coverage, moderate integration test coverage, and a little end-to-end coverage. This is usually visualized as The Testing Pyramid:

![Traditional testing pyramid diagram with a large bottom layer of unit tests, a medium middle layer of integration tests, and a small top layer of end-to-end tests](http…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help