The Lies Of 100% Code Coverage | Prime Reacts
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Related videos
AI Coding Sucks | Prime Reacts
ThePrimeTime
245.8k views
"Use AI Now!" Prime Reacts
ThePrimeTime
199.1k views
How To Gain Code Execution | Prime Reacts
ThePrimeTime
60.5k views
TMUX in 100 seconds | Prime Reacts
ThePrimeTime
322.0k views
Why I Use C | Prime Reacts
ThePrimeTime
242.9k views
20 Years Of Programming | Prime Reacts
ThePrimeTime
90.1k views
Why CS Is Dead | Prime Reacts
ThePrimeTime
250.8k views
Should You Still Learn To Code? | Prime Reacts
ThePrimeTime
423.8k views
LeetCode Isnt Real | Prime Reacts
ThePrimeTime
286.5k views
The Pain Of Frontend Dev | Prime Reacts
ThePrimeTime
456.1k views
Top Comments (10)
Code coverage: Goodhart's Law all over again. "When a measure becomes a target, it ceases to be a good measure"
I'd like to see a mock testing framework _mock_ old school human testers; pun intended. Walk to a pub. Ask for 1 beer, -1 beer, 0 beer, 2^32 beer, 0.5 a beer. Come in through the window, exit through the back door. Breakdance inside and then defenestrate yourself. Introduce yourself as null, empty string, a null terminated string, CRLF, etc.
The answer is obviously > 200% coverage.
I'll tell you what, I'm covering something else to a 100% if you catch my meaning
100% value delivered "to the people" > 100% not happy path code coverage > 100% happy path code coverage
The best code coverage is 100% if it’s achieved via tree shaking removal of all code that isn’t covered in an integration test.
19:20 "The best way to have a well running project is to have tests easier to write and run to test your project than running the project itself" - this is the core takeaway from the video and it is absolutely true. Identifying and managing the path of least resistance is the core of driving human behaviour in general.
300% coverage, bro. You got to pump those numbers up !
It’s crazy how integration tests were not even mentioned. Unit tests are not design to test end to end functionality of your application. It suppose to test individual “units” of it. In reasonable well designed applications 100% coverage would not be even possible because guess what? You have an entry point where you create all your dependencies and that hard and inefficient to mock. That’s when integration tests come in the picture. You should have a set of test that will call real dependencies. For example call the real weather api and verify that the output you get its correct. Units tests by design are not meant to test this type of end to end scenarios. If you find yourself in a situation like this, something in the architecture of your app/ service can be improved.
One of the most useful benefits of testing is that it prevents introducing bugs later on when updating code (regressions)
Unlock the Data Inside
Turn Videos into Knowledge
- Get FREE 10/day: transcripts, summaries, chats
- Chat with videos, export text & PDF
- $1 free API credit for RAG, chatbots & research
Free forever plan • All features unlocked
Top Comments (10)
Code coverage: Goodhart's Law all over again. "When a measure becomes a target, it ceases to be a good measure"
I'd like to see a mock testing framework _mock_ old school human testers; pun intended. Walk to a pub. Ask for 1 beer, -1 beer, 0 beer, 2^32 beer, 0.5 a beer. Come in through the window, exit through the back door. Breakdance inside and then defenestrate yourself. Introduce yourself as null, empty string, a null terminated string, CRLF, etc.
The answer is obviously > 200% coverage.
I'll tell you what, I'm covering something else to a 100% if you catch my meaning
100% value delivered "to the people" > 100% not happy path code coverage > 100% happy path code coverage
The best code coverage is 100% if it’s achieved via tree shaking removal of all code that isn’t covered in an integration test.
19:20 "The best way to have a well running project is to have tests easier to write and run to test your project than running the project itself" - this is the core takeaway from the video and it is absolutely true. Identifying and managing the path of least resistance is the core of driving human behaviour in general.
300% coverage, bro. You got to pump those numbers up !
It’s crazy how integration tests were not even mentioned. Unit tests are not design to test end to end functionality of your application. It suppose to test individual “units” of it. In reasonable well designed applications 100% coverage would not be even possible because guess what? You have an entry point where you create all your dependencies and that hard and inefficient to mock. That’s when integration tests come in the picture. You should have a set of test that will call real dependencies. For example call the real weather api and verify that the output you get its correct. Units tests by design are not meant to test this type of end to end scenarios. If you find yourself in a situation like this, something in the architecture of your app/ service can be improved.
One of the most useful benefits of testing is that it prevents introducing bugs later on when updating code (regressions)