Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Every branch is covered (in theory).

Sumit Rawal answered on August 25, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • how to display a branch description
  • how to check which branch is created by whom in git

  • Every branch is covered (in theory).

    0

    If you’re writing your tests after your app code, do you ever find yourself struggling to hit those last few percentages of code coverage?

    There are debates on how much code coverage is enough (80%? 90%? 95%? 100%?), but in general I feel like your code should have close to 100% code coverage. It’s nice to know that there are no hidden corners of your application that are lacking tests, especially if those spots are crucial parts of your application.

    In practice, 100% code coverage probably isn’t always realistic or worth your time, but it’s a good ideal to strive for.

    A nice side effect of using TDD is that it should result in 100% code coverage. If all the app code you’re writing is to satisfy tests, then in theory you shouldn’t have written any app code that isn’t being tested.

    If you have an if/else statement in your app code where two possible outcomes could occur, it’s very likely you had some sort of product requirement stating “if A, then B should happen; if C, then D should happen”.

    For example, “If the user is logged in, they should be able to see this page content. If the user is not logged in, they should not be able to see this page content.” 

    Popularity 1/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Aug 25 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.