home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / software / 4945 < prev    next >
Encoding:
Text File  |  1992-12-14  |  3.0 KB  |  68 lines

  1. Newsgroups: comp.software-eng
  2. Path: sparky!uunet!ftpbox!mothost!lmpsbbs!comm.mot.com!davidal
  3. From: davidal@comm.mot.com (UK702 DavidAlexander)
  4. Subject: Re: Value of High Code Coverage Metrics in Testing - Request for Opinion
  5. Organization: Motorola Land Mobile Products Sector
  6. Date: Mon, 14 Dec 1992 09:58:03 GMT
  7. Message-ID: <1992Dec14.095803.15093@lmpsbbs.comm.mot.com>
  8. References:  <1992Dec14.072812.13689@syacus.acus.oz.au>
  9. Sender: news@lmpsbbs.comm.mot.com (Net News)
  10. Nntp-Posting-Host: 145.16.3.73
  11. Lines: 55
  12.  
  13. In article <1992Dec14.072812.13689@syacus.acus.oz.au>, paulb@syacus.acus.oz.au (Paul Bandler) writes:
  14.  
  15. <preamble deleted>
  16.  
  17. |> I believe we have a tool to measure the %BFA 'Branch Flow Analysis' but
  18. |> of course the engineers are responsible for producing the test cases to 
  19. |> exercise the code.
  20. |> 
  21. |> I have 3 questions:-
  22. |> 
  23. |> 1)  Do people think that this is a valuable metric?
  24. |> 2)  Is it a cost effective excersize to get engineers to achieve a particular
  25. |>     %BFA as a completion criteria?
  26. |> 3)  What is a realistic %BFA to aim for?
  27. |> Paul Bandler
  28.  
  29. BFA is a valuable tool for testing. %BFA, as with all unitless numbers, is
  30. of a more dubious nature.
  31.  
  32. %BFA does not tell the person looking at it which paths were not tested
  33. and why. This is important because engineers could, subconsciously or
  34. otherwise, use their quota of untested branches to avoid testing the more
  35. complex/niggly areas of code.
  36.  
  37. The nature of the testing is also important - only if you are programming
  38. in an interpreted language where syntax must be checked by execution,
  39. is executing every line of code useful by itself. (You can
  40. run through every branch of a square root function but it won't
  41. test for what happens with a negative parameter. There is always a
  42. temptation to say that a line i++ 'passes because it increments i' without
  43. checking when it shouldn't.)
  44.  
  45. As to cost effectiveness this is so dependant upon the available tools,
  46. maintainance costs, whether or not testability was built into the code etc.
  47. that any global statement would be rash.
  48.  
  49. A realistic %BFA target is again dependant upon specific circumstances.
  50. I don't know if anyone has done any work to find out the %age of
  51. defects found, against testing coverage and time taken but I would
  52. be interested to find out. The benefits of higher percentages are not
  53. linear and certainly peaks.
  54.  
  55. Setting %BFA as a part of completion criteria is probably worthwhile but
  56. getting dogmatic about it is probably not. BFA is very useful for helping
  57. engineers see where more testing is required it is not that useful as an
  58. exam mark for the testing.
  59.  
  60. -- David
  61.  
  62. ========= All opinions are mine and not necessarily Motorola's ============
  63. =  @mail : David Alexander, Channel Tunnel Software, Motorola, Lyon Way,  =
  64. =                           Camberley (ZUK20), Surrey GU15 3QG, U.K.      =
  65. = Email : (Internet) davidal@comm.mot.com  Motorola X400-gateway : CDA004 =
  66. = Telephone : (office) +44 (0)276-413340   (home)+44 (0)276-24249         =
  67. ===========================================================================
  68.