2 votes 2 votes In the simplified flowchart given below, the shaded boxes represent code that is executed during a test case. The Branch coverage is 3/4 2/3 1/2 3/8 IS&Software Engineering gateit-2007 is&software-engineering software-testing normal + – Ishrat Jahan asked Oct 30, 2014 • retagged Nov 13, 2017 by Arjun Ishrat Jahan 1.6k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 6 votes 6 votes There are 8 possible branches. 3 are covered by the test case. So, branch coverage is 3/8. Arjun answered Dec 18, 2014 • selected Apr 13, 2015 by Arjun Arjun comment Share Follow See all 4 Comments See all 4 4 Comments reply Sandeep_Uniyal commented Jan 20, 2015 reply Follow Share Could you explain which 3 are covered ? I am not able to understand. I see just one path covered . 0 votes 0 votes Arjun commented Jan 20, 2015 reply Follow Share 1 path is correct. But branch coverage means how many of the possible branches are taken- count the total number of "yes" and "no" paths and see how many of these are taken. 2 votes 2 votes Sandeep_Uniyal commented Jan 20, 2015 reply Follow Share @Arjun: That means you are talking about every DECISION BOX that is blackened in the flow chart,First (on the top ) takes left path,second (on that side) takes right path, third (third from bottom on that path) takes right path. So three branches are covered by these decision nodes . Am I correct ?? 1 votes 1 votes Arjun commented Jan 20, 2015 reply Follow Share yes. Exactly. 0 votes 0 votes Please log in or register to add a comment.