You are viewing a single comment's thread.

view the rest of the comments →

0
1

[–] kherrera 0 points 1 point (+1|-0) ago 

I agree with how time consuming and complicated it can be, but I disagree that it is useless.

If a unit test breaks and you know about it, then it did its job. Expectations have been changed and the error you see as a result of a failed test is a heads up. Depending on the type of project that is being developed, it is very useful in order to re-evaluate the changes that were made, or to update related processes. It's an excellent way to find regressions before they are pushed to production.

I personally find it tedious to write tests, but I appreciate the piece of mind I get even more after running the tests and getting back a clean result. Some would argue that a clean result doesn't really mean anything, but in practice it comes down to how well the tests were written.

0
1

[–] TheGuyWithFace 0 points 1 point (+1|-0) ago 

Also, I find unit tests very useful for learning about the system I'm working with when I'm first coming onto a project. It's still tedious, but not as much so because I'm learning about how everything fits together as I write my test. Once I'm done I feel a lot more confident about modifying other parts of the codebase and working on bigger tasks.