DEV Community

Discussion on: How much time do you spend writing tests?

Collapse
 
n_develop profile image
Lars Richter

That's an interesting question. And while the correct answer is (as usual) "it depends", I think it would be cool to have some real numbers here.

Of course, this is just an estimation, but I think I spend around 25 - 50% of my coding time in my test suite. It's a big range, I know. But as I said, it depends. If I'm bug fixing, I will write a test that reproduces the bug. This won't take too long normally. But the actual coding in the production code to fix the bug might take a lot longer.

In contrast, while working on feature development, I spend way more time testing. I think this is when I reach something around 50% from time to time.

I would love to hear some more people with actual numbers/estimations.