What is the difference between path coverage and branch coverage?

Showing Answers 1 - 3 of 3 Answers

Hai Manoj,

  • Statement coverage measures the number of lines executed. Code that has 100% statement coverage could easily contain defects.

  • Branch coverage measures the number of executed branches. A branch is an outcome of a decision, so an if statement, for example, has two branches (True and False). Code that has 100% branch coverage can still contain errors.

  • Path coverage more aptly put, data path coverage. This is a measure of the number of paths that contain defined data. This metric is a combination of cyclomatic complexity and data-flow paths. The reason these metrics are combined is to provide a very robust level of coverage not seen in either branch nor statement coverage.

  •  Regards

    Pazhani.G

    Bangalore

    Prasad

    • Apr 25th, 2006
     

    Hi All,

    Path Testing: here Path is fix or define.

    Branch Testing: Here there can be N number of combinatoins/ folws.

    Prasad

      Was this answer useful?  Yes

    Give your answer:

    If you think the above answer is not correct, Please select a reason and add your answer below.

     

    Related Answered Questions

     

    Related Open Questions