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


Please Help Members By Posting Answers For Below Questions

what is the use of l10n testing?

1311


What are the different test techniques used in functional testing?

677


Hi, i am looking job in perfomance testing using Loadrunner can any body help me a project in any domine plz(Usah) chs_29@rediffmail.com

1634


What are the modules of quality center?

657


if yahoo ceo asks you to do performance testing for yahoo site, what are the inputs you ask from them?

1631






If I want to check compability of software in a MAC OS then which steps shold I follow?

1601


What is an error?

669


What are the principles of software testing?

678


Hi friends I am kranti completed my IT diploma in 2005 & after that complete my software testing course. Now I am working in small software form as software tester. I have 2 + year experience in manual testing. Now I wan to change company. Plz told me is there any effect that I can not have any degree although I have 2 + experience ?

1541


Define cause effect graphing?

695


What is positive and negative testing?

675


What is the difference between white box, black box, and gray box testing?

649


What is difference between Build, Version and Release

1687


Do write a separate test case for regression testing? If it is yes, explain how to write the test case?

729


10 scenarios for security testing using gmail applications?

7571