GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Testing  >  Whitebox Testing
Go To First  |  Previous Question  |  Next Question 
 Whitebox Testing  |  Question 14 of 44    Print  
what is path coverage?. How many path coverage are possible?.

  
Total Answers and Comments: 6 Last Update: December 06, 2007     Asked by: preethiganesh 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Bhanuprasad KS
 
This measure reports whether each of the possible paths in each function have been followed. A path is a unique sequence of branches from the function entry to the exit.Path coverage has the advantage of requiring very thorough testing. Path coverage has two severe disadvantages. The first is that the number of paths is exponential to the number of branches. For example, a function containing 10 if-statements has 1024 paths to test. Adding just one more if-statement doubles the count to 2048. The second disadvantage is that many paths are impossible to exercise due to relationships of data. For example, consider the following C/C++ code fragment:if (success) statement1;statement2;if (success) statement3;Path coverage considers this fragment to contain 4 paths. In fact, only two are feasible: success=false and success=true.

Above answer was rated as good by the following members:
tagro82
February 03, 2007 04:06:21   #1  
Bhanuprasad KS        

RE: what is path coverage?. How many path coverage are...
This measure reports whether each of the possible paths in each function have been followed. A path is a unique sequence of branches from the function entry to the exit.Path coverage has the advantage of requiring very thorough testing. Path coverage has two severe disadvantages. The first is that the number of paths is exponential to the number of branches. For example, a function containing 10 if-statements has 1024 paths to test. Adding just one more if-statement doubles the count to 2048. The second disadvantage is that many paths are impossible to exercise due to relationships of data. For example, consider the following C/C++ code fragment:if (success) statement1;statement2;if (success) statement3;Path coverage considers this fragment to contain 4 paths. In fact, only two are feasible: success=false and success=true.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
February 06, 2007 04:03:11   #2  
vels        

RE: what is path coverage?. How many path coverage are...
this is cyclometric complexity problem for path coverage one wants to find out the number of paths involved in a program. no. of decision+1= path coverage
 
Is this answer useful? Yes | No
October 07, 2007 21:20:01   #3  
jponczak Member Since: October 2007   Contribution: 1    

RE: what is path coverage?. How many path coverage are...
A good definition and some examples can be found at  http://codign.com/pathbranchcode.html
 
Is this answer useful? Yes | No
November 19, 2007 00:56:42   #4  
nikhilk265 Member Since: November 2007   Contribution: 4    

RE: what is path coverage?. How many path coverage are...
Path coverage is nothing but the number of paths from start to end of an application.
Possible path coverages can be calculadet by Cyclometic complexity = V- E+2

 
Is this answer useful? Yes | No
November 29, 2007 00:53:03   #5  
mailofanil Member Since: March 2007   Contribution: 1    

RE: what is path coverage?. How many path coverage are possible?.


A path represents the flow of execution from the start of a method to its exit.

The cyclomatic complexity of a software module is calculated from a connected graph of the module (that shows the topology of control flow within the program):

Cyclomatic complexity (CC) = E - N + p

where E = the number of edges of the graph

N = the number of nodes of the graph

p = the number of connected components


 
Is this answer useful? Yes | No
December 06, 2007 07:48:41   #6  
vijaya09 Member Since: December 2007   Contribution: 6    

RE: what is path coverage?. How many path coverage are possible?.
It is a method of LOGIC COVERAGE

And to calculate cyclometric complexity
there are three methods

1)E-N+2

here E - Edges
        N - Nodes

2)P+1
here P means Predicate Node i.e Node from which branches are  coming out

3)C+1
here C means closed region, means when 3 or more than 2 nodes combine and a closed region is formed it is called closed region

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape