DEV Community

Discussion on: Do you apply testing in your side projects?

Collapse
 
idanarye profile image
Idan Arye

I try to. I didn't, int the past, and suffered from it when I made changes and broke things. The benefit of testing in side projects is not proving their correctness - it's protecting yourself from accidentally breaking your code.

As for the type of tests - I prefer integration tests. I think unit tests are overused - they are good for library code, but when you start to need to mock everything their RoI drops and it's time to move to integration tests.

Collapse
 
across_the_grid profile image
Nicho

Thank you, Idan! I think this is something that kept me back from writing tests in the past. Unit tests seemed to me always to be an overkill for the few functions I had. My apps are often connected to databases and Web APIs, so I think integration tests will be also my preferred type in the future 👍