Last updated 1 year ago by Murat Sertdjango
Majority of the junior developers I’ve been mentoring are somewhat frightened of Testing in general. As human beings [precisely lazy ones in case of Developers] we want to write code to solve a problem, counter couple of scenarios wrapped in if or try-catch statements and then worry about writing test later on if all! Well in the real-world of development and especially for Test Driven Development things work literally the opposite. In fact you write your tests before writing any code. Yes you’ve read it correctly, Write the tests before anything else!
I hear you asking the same question which I’ve asked five years ago. “How can you write tests, to test your code if you don’t have any code in place”. Well let us see how in the next section.