what is cyclomatic complexity? plz explain with example
Answer Posted / amit
Cyclomatic Complaxity comes under white box testing.
It means best path searching. To measure logical Complaxity
of a prog.
for ex.
1-main()
2-if(a>1)
3{
------
------
}
4-else
5-{
-------
-------
}
}
Now a diagram would drawn from top as it would start from 1.
underneath it would be 2. and 2 would have two edges i.e. 3
and 4. they would futher combine to form 5.
2,3,4 & 5 would make close regeoin while outside would
become open region..
the arrows joining would be edges 2 would become predicate
node. while others are simple nodes.
it has got a formula:
v(g)=Node-edges+2
v(g)= 5-5+2
v(g)=2
v(g)= predicate node+1
v(g)=1+1
v(g)=2
So its logical correct.
Please correct me if i'm wrong.
| Is This Answer Correct ? | 74 Yes | 29 No |
Post New Answer View All Answers
Have you worked in UDAP (Credit Card act 2009) project?What did you test in Billing & Payment modules?
In our project, we use Withdrawal Indent, we are confused to use heading as "Withdrawal Indent" or "Withdraw Indent". Please suggest me which one to use ASAP, Thanks in advance
wat if fiddler and how it is used in tesing an application. please explain with a real time scenario
i need some objective type papers for my certification
What is a test scenario?
How can data caching have a negative effect on load testing results?
test cases on bangles???
Write 2 scenarios for Integration testing? Please let me know its urgent.
What is a test server?
What is fuzz testing?
What is the typical situation u faced while collecting the test data?
how to access a build & wat is its configuration
How to test an Scheduled event? For ex: in an investment banking application, the scheduler will create an equity anbd user has nothing to do but tester has to test if the instrument is created properly or not?
1.How to maintain the Bug status Report? 2.What is project based Company and product based company?
When we are recording in WinRunner and interact with the AUT, what does WinRunner do?