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
What are differences between Testing in Uncontrolled Environment and Abnormal Environment?
what are the status have in QC(Test Management Tool). and how you report?
Explain Single View Testing ?
What are the different strategies for rollout to end users?
what are the 3 test tool categories and describe what each can do.
What is alpha testing?
Tell me example for Risk,Mitigation,Assumption?
What different types of manual testing are there?
What is revision history and the content of revision history table?
Explain the strategy for testing a Java application?
What is difference between Manual testing and Pega/BPM testing?
Please let me know how to test labels in web application manually and how the testcases would be. Please provide me a sample testcase
You may be overqualified for this position we have to offer
What is desk checking and control flow analysis
What is ofx testing?