← Back to context

Comment by hahahahhaah

7 hours ago

It is a matter of horses for courses. Be driven by what the tests cost and what they accomplish.

Costs may be:

* Developer time to make and maintain.

* CI time means slower CI and higher costs there.

* Ossification of source code (especially unit tests, less so integration). Meaning harder to refactor as you also need to rewrite tests.

Benefits:

* Finds bugs

* Can be a handy local dev loop and local debugging loop

* Documents code and proves that documentation is correct

* Helps with AI assistance

* Integration tests should make refactoring easier or more confident.

I would err on the side of good coverage (80% excl stupid stuff) unless I have in hand a specific reasin not to.