Print Page | Close Window

diff between path coverage and brach coverage

Printed From: One Stop Testing
Category: Software Testing @ OneStopTesting
Forum Name: Beginners @ OneStopTesting
Forum Discription: New to the Club...!!! Don't Worry, We are here for you...!!! Learn the very basics of Software Testing and other pertinent Informations.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=3693
Printed Date: 15Jul2025 at 1:56pm


Topic: diff between path coverage and brach coverage
Posted By: pothiraj_mit
Subject: diff between path coverage and brach coverage
Date Posted: 20Nov2007 at 12:52pm

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




Print Page | Close Window