Home / Companies / Sleuth / Blog / Post Details
Content Deep Dive

Code Coverage: Is 90-95% really necessary?

Blog post from Sleuth

Post Details
Company
Date Published
Author
Don Brown
Word Count
1,083
Company Posts That Month
4
Language
English
Hacker News Points
-
Post removed?
No
Summary

In the engineering improvement runbook, Don Brown discusses testing and code coverage. He introduces the concept of a testing pyramid with smoke tests at the top, end-to-end tests in the middle, integration tests below that, and unit tests forming the base. The number of tests decreases as you move up the pyramid. Brown emphasizes that setting code coverage targets depends on the complexity of the code being tested. For instance, a parser or protocol implementation should be massively tested, while getters and setters may not need unit testing at all. Unit tests can also serve as documentation for developers, reducing risks associated with changes in production. In conclusion, while 90-95% code coverage might be necessary in some cases, it's not always required. The key is to understand the complexity of the code and adjust testing efforts accordingly.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.