I'm replying to this and also some of the sibling comments.
No, automated development-time tests do not necessarily equate to higher quality, given that they:
- Take time away from other activities
- May provide a false positive, lulling developers into a false sense of confidence
- Increase the time taken for certain CI/CD operations, sometimes by hours or days!
- The presence of a large volume of "test" code means that certain refactoring operations take a lot longer, which is a real cost.
People go into some work environments where tests DID help, and they generalise that to ALL work environments.
Automated build-time tests are less important, and entire categories may be potentially unnecessary when:
- The product is written in a strongly-typed language that catches most errors at compile time.
- If high-level "linting" tools are used to further enhance the code quality before the executable ever runs.
- If feedback from the production environment is more relevant. E.g.: for web applications with performance issues being monitored by an APM, but no critical code stability concerns at build time. Think typical web apps with no real consequences to a crash, not finance applications where a small error could mean Real Money.
- Where time-to-market is more important than chasing 100% robustness at the expense of meeting release dates.
You often see people from a PHP or Python background go on and on about the importance of tests, but those are dynamically typed languages with lots of unexpected pitfalls that only testing will uncover. Meanwhile entire teams do just fine without any automated tests when using languages like C#, Java, or Rust.