I came across SO many misconceptions around testing over the years it's eye-opening. No wonder so many devs find themselves lost and then missing the point of testing altogether.
You DON'T need 100% code coverage. You DON'T have to do TDD. You DON'T have fill in the pyramid.
You DON'T need 100% code coverage. You DON'T have to do TDD. You DON'T have fill in the pyramid.
Comments
You. Write. Tests. For. Your. Users.
Period. The same reason you build your software.
https://www.epicweb.dev/the-true-purpose-of-testing
- Define clear boundaries of your system.
- Isolate behaviors.
- Achieve determinism through the test setup.
- Act like your user.
- Assert like your user.
A complete lie, sorry. Even a single properly written test brings a ton of value. Why? Because you had none and was doing guesswork, and now you have a reliable test!
I will let you on a little secret. Testing levels are nothing but a set of setup requirements to yield different results in tests 🤫 That's it.
Nothing more than boundaries you draw around your SUT.