Comment by seanwilson

Comment by seanwilson 6 days ago

1 reply

> Writing tests isn't free, I agree, but in this case a good chunk of the cost of writing them will have already been paid in a way.

Some examples that come to mind are bugs to do with UI interactions, visuals/styling, external online APIs/services, gaming/simulation stuff, and asynchronous/thread code, where it can be a substantial effort to write tests for, vs fixing the bug that might just be a typo. This is really different compared to if you're testing some pure functions that only need a few inputs.

It depends on what domain you're working in, but I find people very rarely mention how much work certain kinds of test can be to write, especially if there aren't similar tests written already and you have to do a ton of setup like mocking, factories, and UI automation.

Ragnarork 6 days ago

Definitely agree with you on the fact that there are tests which are complicated to write and will take effort.

But I think all other things considered my impression still holds, and that I should maybe rather say they're easier to write in a way, though not necessarily easy.