Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is cyclomatic complexity? plz explain with example

Answer Posted / deep singh kushwaha

Cyclomatic complexity is a software metric (measurement) developed by Thomas McCabe and is used to measure the complexity of a program. It directly measures the number of linearly independent paths through a program's source code.
One of the ways is counting the number of closed loops in the flow graph, and incrementing the number by one.
i.e.
M = Number of closed loops + 1
where
M = Cyclomatic number.
Implications for Software Testing
M is a lower bound for the number of possible paths through the control flow graph.
M is an upper bound for the number of test cases that are necessary to achieve a complete branch coverage.
For example, consider a program that consists of two sequential if-then-else statements.
if (c1) {
f1();
} else {
f2();
}
if (c2) {
f3();
} else {
f4();
}
To achieve a complete branch coverage, two test cases are sufficient here.
For a complete path coverage, four test cases are necessary.
The cyclomatic number M is three, falling in the range between these two values, as it does for any program.

please suggest me if i m wrong..
e-mail-deepsingh.154@gmail.com

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how will you test a wine filled bottle along with 100 glasses

2281


what is difference between win 98 and win 2000 poertating system?which is better one?

2223


whta is compile module?

2097


Test cases for Internal IP Messenger

4774


How to do integration testing on duster......

1690


what is your daily activities?

2095


I have an UI issue "please fill out this field" pop up in firefox browser keeps scrolling with the page is it valid???

1953


Assume a login page, and you have written 10 cases(say for example). How will you justify that these 10 testcase suffient for the login and how do you say this is 100% satisfies the need.

2205


Can you explain requirement traceability and its importance?

1100


Katari your questions was really helpful could you please send the questions and answers with them . Can anyone sends the top 30-40 question and answers for the interview purposes

1809


What is a critical bug?

1036


in transfer funds module, how you come to know that amount has been transferred successfully or not....explain in detail

1549


Hi Can any one tell wht type of questions will be asked in project manager round...urgent plz...

2084


What r the things,u prefer and prepare before starting testing?

2236


Can you explain the various elements of function points ftr, ilf, eif, ei, eo, eq, and gsc?

1325