From: truediogen@... (Vladimir) Date: 2001-12-20T19:09:15+09:00 Subject: [ruby-talk:29087] Re: John Roth dolt ( Re: A challenge to proponents of Unit Testing. ) rbinder@rbsc.com (Bob Binder) wrote in message news:... > In typical situations with lots of branching and iteration, the tests > needed to achieve statement coverage are not obvious, hence the need > for a coverage analyzer to determine that statement coverage (better > yet branch) has been actually been achieved. Some comments based on my experience. Statement coverage is _not enough_. I've made an experiment. We have behavior-based (black-box) test requirements written. Then we wrote a bunch of tests that achieved 80% of statement coverage. Afterward we have measured the coverage of those test requirements and got a value less than 30%. What is most important some of those test requirements not covered did find the defects. This happens because C1 (statement coverage) has nothing to do with data and application state. How you maybe already know each test consists of three parts: action, state and expected output. There are also two different approaches to model coverage Data model and Code model. Take a look at Domain, Controlflow and Dataflow testing if somebody of you is interested. Of course code model coverage maps into data model coverage but the difference in approaches to same problem is remarkable. ---- Best WIshes, Vladimir