From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.0 required=3.0 tests=BAYES_40 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 30 Jul 93 14:29:02 GMT From: widget!brandon@uunet.uu.net (Brandon) Subject: Re: McCabe references? Message-ID: <1993Jul30.142902.2028@evb.com> List-Id: progers@ajpo.sei.cmu.edu (Pat Rogers) writes: >Can anyone provide references on "McCabe Complexity Analysis" and >"McCabe Structured Testing" in general, and wrt Ada in particular? >Many thanks, >Pat Rogers In our "Testing Ada Software" class, we use McCabe quite a bit to test Ada code. We have quite a bit devoted to how to apply it as a testing procedure. As far as references, The best (other than our class :-) ) that I can point you to are: Software Testing Techniques, 2nd Edition, Bezier The Art of Software Testing, Myers "An Internal Approach to Testing Horizontally Reusable Software", Proceedings of the 5th Annual STC Conference, 93 Goldfedder (Overall of where McCabe fits in to A testing process) Some particular things to note in applying McCabe to Ada: 1) use V(G) = e - n + p + 1 NOT V(G) = e -n + 2p where e = number of edges in graph n = number of nodes in graph p = number of disconeected paths 2) Exceptions need special care w.r.t Ada. It is unrealistic (IMHO) to draw paths from each line of code to the exception handler (I have heard some arguments to the contrary though :-). The method, I have found works best is to treat it as a case statement and either leave it as a disconnect path or connect it to the entry node. Either way, it yields the same complexity. 3) Use basis path analysis as a guide not a rule. Applying McCabe with Ada must account for Data Sensitivity, and some Ada specific issues that need a little extra attention 4) Keep in mind that White Box Coverage of Source in no way implies White Box Coverage of the final executable code. McCabe can also be applied (rather costly) at the executable level as well. Hope this helps a little Brandon Goldfedder Director of Training EVB Software Engineering, Inc. -- brandon@evb.com ------------------------------------------------------------- Brandon Goldfedder EVB Software Engineering, Inc.