what is cyclomatic complexity? plz explain with example

Answer Posted / dhakshna

The easiest way is to sum the number of binary decision
statements (e.g. if, while, for, etc.) and add 1 to
it

Below is a simple program as an
example:
IF A = 354
THEN IF B > C
THEN A = B
ELSE A = C
ENDIF
ENDIF
Print A

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 ?    109 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you do (with the project staff) when the schedule fails?

1858


Hello again!! wanted to ask you HOW EXACTLY create stubs and driver in integration testing? 2.whats the difference between integration testing and system integration testing? Thanks!!

1948


What is the difference between SIT AND IST?

2839


What is the limit for test steps?It should be 10/20/30etc

1707


whats the reason to display the password(not in encrypted form) in the script in load runner but not in QTP?

1686


What is difference between V-Model and Agile Model?

1942


WHAT IS OBJECT REPOSITORY? AND IT TYPES? HOW MANY TYPES OF ACTIONS ARE THERE IN QTP? CAN WE ADD NEW OBJECTS AND PROPERTIES INTO SHARED OBJECT REPOSITORY?

1687


1)What are the QA procedures followed 2) Write test cases on a weatherreport.com web page that has only two dropdown and a submit button, Fist drop down is a countries and second is metros in the selcted countries.When proper selection si doen and submitted it shows weather report of that metro.? 3)Write test cases on Mobile Alarm Module? 4)Write test cases on Company Water Bottle?

2924


What is difference between Manual testing and Pega/BPM testing?

7855


What are the main key components in Web applications and Client Server applications? and their differences?

1734


What is the big deal about ‘requirements’?

968


During alpha testing why customer people are invited?

928


Encapsulation of attributes and operations inside objects makes it easy to obtain object state information during testing. is it true.explain

1877


About Hierarchy level in your company.

1846


What are joins and subjoins in the data bases what is data driven testing what is verification and validation What is Quality Assurance (QA) and Quality Control (QC) Is Verification is related to QA and Validation is related to QC ? which type of model you follow basically in your project what is a use case How to test a Bike how to test a Lift (Elevator). which configuration Management tool do you use which Bug tracking tool do you use explain Bug life cycle what is Regression testing what is ALPHA testing ans BETA testing What types of testings comes under Non functional testing what is TEST DIRECTOR what is CMM and CMM i whar are Expressions in Winrunner What is a Compile module Is it Necessary to open the tool first or the application first after getting a bug what will you do if you add a new object or a new module for the existing application then how will you test the application which Defect tracking tool do you use what is change management What is smoke Testing what is sanity testing A application is given to you but the requirements and functionalities are missing what will you do to start the testing which testing documents will be received by the client

2257