461
you are viewing a single comment's thread
view the rest of the comments
[-] argv_minus_one@beehaw.org 6 points 1 year ago

Writing good tests is foxtrotting hard, don't kid yourself.

Writing good tests that are actually readable and thoroughly exercise the code under test is damn near impossible.

Send help.

[-] Mot@beehaw.org 4 points 1 year ago

So so many unit tests I see don't meaningfully test anything. It would be faster to just read the unit under test because the test itself presents nothing that you wouldn't instantly recognize. Or the test is so tightly coupled to some arbitrary property that of course the test fails whenever you change something. UI tests at my current place are terrible for this, as they're just comparing DOM structures so any change breaks it.

[-] argv_minus_one@beehaw.org 1 points 1 year ago

I've never done automated UI testing. Honestly, I'm afraid to.

[-] Mot@beehaw.org 1 points 1 year ago

It's not the worst thing. Like any other test there are more and less valuable methods. Imo, the hardest part is not coupling yourself to the incidental. All tests have that issue but UIs are almost entirely incidental. Styles, layout, and even data and function can be incidental and thus likely to change.

this post was submitted on 28 Jun 2023
461 points (97.1% liked)

Programmer Humor

19623 readers
1 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS