DEV Community

Discussion on: Do you aim for 80% code coverage? Let me guess which 80% you choose...

Collapse
 
tomekbuszewski profile image
Tomek Buszewski

There are miles and miles between knowing something and using it. For example, TDD doesn't work when you need visual regression testing (or maybe it does, but I don't know how to implement it).

I really love TDD and often find myself spending too much time writing tests for my apps and then being too tired to write the actual code :D

What do you mean by web apps?

Thread Thread
 
patryktech profile image
Patryk

What do you mean by web apps?

I mean I personally wouldn't use TDD to develop apps that are run on the web (essentially a buzzword for a website that has more functionality than an informative company or personal page, such as booking.com, a taxi booking app, etc. - anything with a lot of dynamic content).

I can use it for some functionality, but not the whole thing (in contrast to Obey the testing goat that advocates always using TDD).

Thread Thread
 
tomekbuszewski profile image
Tomek Buszewski

Such apps, in my opinion, should consist of modules. And a lot of modules, especially the ones that are just emitting API, can be done with TDD. It's a whole different story with front-end, but even there you can try TDD with E2E tests. Because you only define "handlers", and they can be defined before the coding starts.