Comment

Comment by tapan_k

I find it much more helpful to think in terms of why and what we will test rather than how much will we test. This approach resolves a few of the frequently debated issues around testing, such as:

1. Should I test first, or test later?

2. What is the right amount of code coverage?

3. Should I write more unit tests or integration tests?

4. Should I use mocks or not?

and so on...

The above questions can have an arbitrary answer that makes sense in a certain context but may not yield the best cost / benefit ratio in other contexts. Hence, the guiding star needs to be: why are we writing a test.

parent tapan_k 10 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton