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

@SkyNTP@lemmy.ml
link
fedilink
7
edit-2
10M

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
  • 77 users / day
  • 211 users / week
  • 413 users / month
  • 2.92K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.8K Comments
  • Modlog