3 ms·
I remember asking folks for tests for their stuff, and they didn't want to do it because it would take too much time and effort. And I said "It doesn't have to
by m463 2y ago
I remember asking folks for tests for their stuff, and they didn't want to do it because it would take too much time and effort. And I said "It doesn't have to be perfect, just do a simple sanity check".
It's possible people on the opposite ends of the perfectionism scale might view tests differently.
The perfectionists want 100% test coverage which takes a serious commitment of time and effort, while the fast-and-loose folks don't want to bother with tests at all.
I wonder if the best way to test is to have the fast-and-loose people make fast-and-loose tests, and then let the perfectionists iterate on the tests as time goes on.
- simonw 2y agoTotally agree. One of my favourite style of tests is this: for path in ("/", "/news/", "/about/"): response = client.get(path) assert response.status_code == 200 Run that on every commit and if you accidentally ship something that throws an exception on one of those pages you'll know about it instantly.
- 3eb7988a1663 2y agoI have spotty test coverage, but always configure a high level smoke test on every end point. Prevents silly mistakes that might otherwise slip through and trivial to implement. Can supplement for the more complex interactions, but gives a big safety blanket that there has not been a regression which breaks everything.