65
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 04 May 2024
65 points (98.5% liked)
Ask Experienced Devs
1490 readers
1 users here now
Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient
founded 3 years ago
MODERATORS
Very common. Your coworkers are either idiots, or more likely they're just being lazy, can't be bothered to set it up and are coming up with excuses.
The one exception I will allow is for GUI programs. It's extremely difficult to do automatically tests for them, and in my experience it's such a pain that manual testing is often less annoying. For example VSCode has no automatic UI tests as far as I know.
That will probably change once AI-based GUI testing becomes common but it isn't yet.
For anything else, you should 100% have automated tests running in CI and if you don't you are doing it wrong.
Leadership may be idiots, but devs are mostly just burnt out and recognized that quality isn't a very high priority and know not to take too much pride in the product. I think it's my own problem that I have a hard time separating my pride from my work.
Thanks for the response. It's good to know that my experience here isn't super common.
Our standard practice is to introduce a thin layer in front of any I/O code, so that we can mock/simulate that part in tests.
So, if your database-library has an
insert()-function, you'd introduce a interface/trait with aninsert()-function, which's default implementation just calls that database-library and nothing else. And then in the test, you stick your assertions behind that trait.So, we don't actually test the interaction with outside systems most of the time, because well:
We do usually aim to get integration tests with all outside systems going, too, to ensure that we're not completely off the mark with the behavior that we're simulating, but those are then often reduced to just the happy flow.