If you do not have time to write tests today - you will find the time for fixing bugs Fridayโs night
In other words, to establish solid reliability in production tomorrow we need to invest our time today. Your need for tests for your current project depends on:
Size of the team that maintains to the codebase: return True if team.size > 1 else False. Having more engineers means more views on the same items. Tests help to document the opinions how a class or function can be used.
Size of the codebase: return True if project.modules > 1 else False. You can't remember the color of socks that you wore two days ago. Can you remember everything in the project?
Duration of development and maintenance phases of the project. The script that you run only once can perfectly live without a solid test coverage. If you're building a system for decades - please, prepare a good legacy for the next generations of developers.
In other words, to establish solid reliability in production tomorrow we need to invest our time today. Your need for tests for your current project depends on:
return True if team.size > 1 else False
. Having more engineers means more views on the same items. Tests help to document the opinions how a class or function can be used.return True if project.modules > 1 else False
. You can't remember the color of socks that you wore two days ago. Can you remember everything in the project?I published a blog post on Dev.to() on the topic recently:
No Tests - No Pull Request, Right? Types of Tests that Should Be in Your Codebase.
It might help you yo convince your teammate.