3 ms·
> it’s no silver bullet: your software is not going to crash and burn if you don’t write your tests first, and the presence of tests alone does not mean you won
by 1penny42cents 6y ago
> it’s no silver bullet: your software is not going to crash and burn if you don’t write your tests first, and the presence of tests alone does not mean you won’t have maintainability issues
This is not what tests are for. Tests rarely catch bugs for the first version of their code. They often catch bugs in modifications to that code, and any bugs that aren't caught can be added as a test. Tests are like checkpoints in video games. They guarantee that you don't regress past a point. Over time you build up so many checkpoints that your code is hard to break without a test failing. It's an evolutionary process.
- tcgv 6y agoAgree. Also, as a consequence in the long run writing unit tests / automated tests is the only way for maintaining productivity in a complex project, as every required code change to an existent component poses a great risk, and without automation it will be necessary countless hours of manual testing. Shameless plug: I while ago I wrote on the topic of how projects should be structured with the goal of automated testing in mind [1] [1] https://thomasvilhena.com/2020/04/on-the-architecture-for-unit-testing https://thomasvilhena.com/2020/04/on-the-architecture-for-un...