What is path coverage?. How many path coverage are possible?.

Questions by preethiganesh

Showing Answers 1 - 6 of 6 Answers

Bhanuprasad KS

  • Feb 3rd, 2007
 

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.

vels

  • Feb 6th, 2007
 

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

  Was this answer useful?  Yes

nikhilk265

  • Nov 19th, 2007
 

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

  Was this answer useful?  Yes

mailofanil

  • Nov 29th, 2007
 


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

  Was this answer useful?  Yes

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

  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