Tests That Help You Find Defects Faster
This talk is about common mistakes people make when writing tests. Mixing multiple concerns inside tests is tempting because it can feel like painting the whole picture. However, it obfuscates the root cause when a test fails. Setup methods are great, but when developers are too focused on keeping their tests DRY, they can easily cause test interdependence. Therefore, some principles we have learned to build our software we need to unlearn when it comes to testing. The talk highlights more aspects like bloated tests, making it hard to figure out what they are about, and proper assertions to get better error messages. Especially if you don't work with TDD, it can be easy to come up with a test that looks good but stands in your way when it fails. This talk focuses on the four scenarios I outlined above, explains why it makes sense to think about them, and provides actionable suggestions on improving tests.