home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.software-eng
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!cs.uiuc.edu!marick
- From: marick@cs.uiuc.edu (Brian Marick)
- Subject: Re: Value of High Code Coverage Metrics in Testing - Request for Opinion
- Message-ID: <BzGut2.1wE@cs.uiuc.edu>
- Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
- References: <1992Dec14.072812.13689@syacus.acus.oz.au>
- Date: Fri, 18 Dec 1992 17:48:38 GMT
- Lines: 52
-
- I have little to add to the previous answers to this question. I'd
- like to reinforce a couple of points:
-
- - 100% coverage is possible for many programs. The problem is far
- more often test implementation than test design. A lot of times, a
- little test support code in the program can make those implementation
- problems tractable.
-
- - Coverage is bad at finding the most important class of bugs, faults
- of omission. These are bugs that are fixed by adding code, like the
- following IF:
-
- if (c != 0)
- a = b / c;
-
- Designing tests around coverage is not helpful in finding faults
- of omission and may be harmful (because it focuses your attention in
- the wrong place). Don't do it. Design your tests elsewise, then use
- coverage as an indirect measure of their quality.
-
- - Partial coverage goals (be they 60% or 85% or whatever) are
- dangerous. Given an easy, measurable goal (reach X% coverage) that's
- only indirectly related to the true goal (find all the bugs), it's
- incredibly easy to blindly achieve the easy goal at the expense of the
- true one. You start with a list of uncovered branches and just go
- down the list, writing the easiest possible tests that force them,
- until you've hit the required percentage. Those easy tests are
- probably bad.
-
- - Other types of coverage besides branch are useful. In situations
- where I would use branch coverage, I use three other types: loop,
- relational, and multicondition. See the GCT documentation (info
- below) for more.
-
-
- I've previously posted a description of how I used a coverage tool to
- test itself. I won't post it again, but I'll mail it to anyone who
- missed it the first time.
-
- Brian Marick, marick@cs.uiuc.edu, testing!marick@uunet.uu.net
- Testing Foundations: Consulting, Training, Tools.
- Freeware test coverage tool: see cs.uiuc.edu:pub/testing/GCT.README
-
-
-
-
-
-
-
-
-
-
-