100% code coverage is a bullshit metric that nobody should aim for.

@SkyNTP@lemmy.ml
link
fedilink
7
edit-2
1Y

We should strive for a wide range of test cases. Real testing is done when the software is tested against a wide range of user inputs. Code coverage is no indicator of response to cases.

Unit tests are a fantastic way of implementing test cases. I am of the opinion that most bug PRs should start with a unit test, if nothing else, a persistent reminder that: hey BTW, your user is going to input this garbage, so any logic you implement ALSO has to be resilient against that garbage.

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 38 users / day
  • 158 users / week
  • 432 users / month
  • 2.41K users / 6 months
  • 1 subscriber
  • 1.61K Posts
  • 35.6K Comments
  • Modlog