what is cyclomatic complexity? plz explain with example

Answer Posted / mrinalini

Cyclomatic complexity is a metric used for complexity based
testing proposed by McCabe
McCabe actually proposed 3 metrics:cyclomatic,essential and
actual complexity.All 3 are based on the graphical
representation of the program being tested.First 2 are
calculated from the graph and the 3rd one is runtime metric.
mcCabe used the theory of graph in defining Cylocamatic
complexityThere are sets of
linearly independent program paths through any program
graph. A maximum set of these linearly
independent paths, called a basis set, can always be found.
Intuitively, since the program graph
and any path through the graph can be constructed from the
basis set, the size of this basis set should be related to
program complexity. hence in a layman's language Cyclomatic
complexity is number of Decision statements in the program
being tested plus one.

Is This Answer Correct ?    41 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If automating - what is your process for determining what to automate and in what order

1531


structure of an incident report is covered in stand for software test document IEEE 829 and is called as?

2267


There is an opening in our organization Sierra Atlantic, Hyderabad. All Manual test engineers with 2-3 years of experience can forward your resumes to mah_cs82@yahoo.com before May 01, 2008. (Only manual testers) with a covering letter, current CTC and Expected CTC.

1655


State a generalized process for load test? Or explain how you did it previously.

2081


Can you explain an application boundary?

646






What are bug leakage and bug release?

715


1.What is bidirectional traceability ??? and how it is implemented? 2.What is Automation Test frame work ? 3. Define the components present in test strategy? 4. Define the components present in test plan? 5. Have u written Test plan ?…. thank u!plz reply........

2250


What is the difference between Sleep and wait in winrunner what is integration testing and types of testing present what is system testing what is data driven testing what is functionality testing if requirements are given to you then how do you write the test cases for it Account number = Ok cancel For above given form the valid account number starts from 1 to 1000 so is it necessary to input the 1,2,3 ….998,999,1000 test cases to check the conditions of valid account numbers I,e is it compulsory to write 1000 test cases for the above form

2134


hi every one can you send me ISTQB Course material on my Email id deeptimundra997@gmail.com

1761


any one giv test cases for wordpad using equivalence class partioning

2590


What is Test Design ?( Urgent) and Test Design for Printer?

1563


What is the big deal about ‘requirements’?

726


What can you tell about the project if during testing you found 80 bugs in it

1815


What is the Difference between Network testing and Web Testing?

1726


hi experts, i was asked to write down the requirement description,test scenario, and test cases for gmail login and send email and then to check the email was sent in the sent mails.the format given to me was like this: Req ID, Req description, Test Scenario, Test cases....Can anybody please help me out with this..

1583