File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programming Diversions and the fly likes cyclomatic complexcity Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Other » Programming Diversions
Reply Bookmark "cyclomatic complexcity" Watch "cyclomatic complexcity" New topic
Author

cyclomatic complexcity

sameera liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 597
how can we measure the software using cyclomatic complexcity?
Muse Ran
Ranch Hand

Joined: Sep 17, 2008
Posts: 316
Cyclomatic complexity measures the amount of decision logic in a single software module.

It is used for two related purposes in the structured testing methodology.
1. it gives the number of recommended tests for software.
2. it is used during all phases of the software lifecycle, beginning with design, to keep software reliable, testable, and manageable.
Cyclomatic complexity is based entirely on the structure of software’s control flow graph.


Tomorrow will surely be a new day!!!
sameera liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 597
can please you give more explain about this
Muse Ran
Ranch Hand

Joined: Sep 17, 2008
Posts: 316
It is a measure of complexity of a program (algorithm).
it can be used only for small piece of code like small functions.
It gives minimum test cases required to execute each line of code.
It is best suited for unit testing written by developers.
The complexity is increaded by logic (with the use of loop and if-else state ments).
A progrma without any loop and if-else with all sequential statement have complexity 1.
It is a core White box technique.
Achieving the code coverage using complexity for a application code is nearly impossible as it will reruire years.
sameera liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 597
Thanks Muse
 
IntelliJ Java IDE
 
subject: cyclomatic complexcity
 
Threads others viewed
high cyclomatic complexity
Cyclomatic complexity calculation by PMD plugin -Maven.
Tool for Modularity check of java code
Calculating Cyclomatic complex for a whole class
code coverage tool
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture