|
Bruegels Fuckbooks posted:b) For unit tests, YMMV, but getting 100% code coverage is an extremely optimistic goal and a waste of time imo. I would say a good rule of thumb is to get your codebase into a condition where you could potentially write unit tests that represent any problem, unit test public interfaces of components only, and use the unit tests as examples of a) how to use the component, b) a way of automating the regression testing (as if all bugs can be represented as unit tests, then if you can write unit tests to represent the bugs, you can stop regressions.) It might be better to see if you can mandate having unit tests for every bug fix instead of an arbitrary code coverage requirement. Lots of bugs get introduced when someone who doesn't have insight into the original purpose of code changes that code to fix another bug and doesn't consider its effects in an edge case. Occasionally, that "someone" is you: the person who wrote the code a while ago. Khorne fucked around with this message at 20:11 on Jul 11, 2018 |
# ¿ Jul 11, 2018 20:02 |
|
|
# ¿ May 22, 2024 16:52 |