TDD stands for Test-Driven Development. It is a software development process in which tests are written first, before any code is written. The tests are written to define the desired behavior of the code that will be written. Once the tests are written, the code is written to pass the tests. This helps to ensure that the code does what it is supposed to do, and that it works correctly. TDD is particularly useful for JavaScript development, as it helps to ensure that the code runs properly on different browsers and devices.
TestJS Summit 2021TestJS Summit 2021
21 min
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 focussed on keeping their tests DRY they can easily lead to 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 which make it hard to figure out what they are about and proper usage of 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.
The talk will have a look at the four scenarios I outlined above, explain why it makes sense to think about them and actionable suggestions how to improve tests.