what is cyclomatic complexity? plz explain with example
Answer Posted / devyani
Below is a simple program as an example:
IF A = 354
THEN IF B > C
THEN A = B
ELSEA= C
ENDIF
ENDIF
Print A
The control flow generated from the program would look like Figure 3.2.
The control flow shows seven nodes (shapes) and eight edges (lines), thus using the formal formula the cyclomatic complexity is 8-7 + 2 = 3. In this case there is no graph called or subroutine. Alternatively one may calculate the cyclomatic complexity using the decision points rule. Since there are two decision points, the cyclomatic complexity is 2 + 1 = 3.
Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
why testcases are written and what is the importance?
How does a coverage tool work?
What are the review documents used for testing?
Beyond the customary advantages of having a testing group, what are the benefits does a company receive from a well run, automated testing group?
if yahoo ceo asks you to do performance testing for yahoo site, what are the inputs you ask from them?
Hi , Please send me the interview questions which were asked in manual testing mainly the test cases asked to write in interview.
What are the different ways to check a date field in a website?
What is defect removable efficiency?
How did you do unit testing in your project?
What is showstopper defect?
Where we have to use perl scripting in Testing approach and its importance
In Manual testing how to test proxy servers? can u please explain with example?
Tell me example for Risk,Mitigation,Assumption?
Can you explain equivalence partitioning?
When did u complete testing ? Which scenrio should not be in automation testing ? why ?