GeekInterview.com
Series: Subject: Topic:
Question: 24 of 210

What is the difference between path coverage and branch coverage?

Asked by: kavitha_pendkar | Member Since Feb-2006 | Asked on: Jun 27th, 2007

View all questions by kavitha_pendkar   View all answers by kavitha_pendkar

Showing Answers 1 - 1 of 1 Answers
lasolas

Answered On : Sep 24th, 2007

Path coverage testing is arguably the most thorough type of testing that seeks to test the critical paths of software code in an application.  These major paths of code may have several decision points or "if" statements which branch off the main path.  Branch coverage testing aims to ensure that each branch from each "if" statement is executed. 

For example, a main path with three if statements; if(x), if(y), if(z) would need six test cases to ensure full test coverage as follows:

test case 1 if(x) = true
test case 2 if(y) = true
test case 3 if(z) = true
test case 4 if(x) = false
test case 5 if(y) = false
test case 6 if(z) = false

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.