I don’t think this is correct. I write scientific computing code in Rust at the moment for example — I write unit tests to make sure it actually works.
Being confident my stuff works without unit tests would require me to write unit tests and then delete them.
I very much agree with James Coplien approach to unit tests:
- Keep unit tests that test key algorithms for which there is a broad, formal, independent oracle of correctness, and for which there is ascribable business value.
Though I'd say that for low-level code (without dependencies) there's basically no difference between unit/integration/e2e tests. They are just tests.
The only difference I found is that with unit tests people will also test implementation details. So it's still better to have integration test mindset even when your only option is unit tests.
Comments
I don’t think this is correct. I write scientific computing code in Rust at the moment for example — I write unit tests to make sure it actually works.
Being confident my stuff works without unit tests would require me to write unit tests and then delete them.
I very much agree with James Coplien approach to unit tests:
- Keep unit tests that test key algorithms for which there is a broad, formal, independent oracle of correctness, and for which there is ascribable business value.
Though I'd say that for low-level code (without dependencies) there's basically no difference between unit/integration/e2e tests. They are just tests.
The only difference I found is that with unit tests people will also test implementation details. So it's still better to have integration test mindset even when your only option is unit tests.