Unit testing: essential and complicated at the same time

When I started coding I could develop for hours without executing my code. Then, I needed to debug it for hours. It wasn’t funny! I discovered what was testing and I understood its benefits. However, it wasn’t easy to write my first tests. We can make many mistakes that make tests hard to write and maintain. I would like to present to you what I have learned over the last few years to help you write tests.