From: David B Lightstone Date: 2001-12-08T00:34:56+09:00 Subject: [ruby-talk:27813] Re: John Roth dolt ( Re: A challenge to proponents of Unit Testing. ) "Keith Ray" wrote in message news:k1e2i3t4h5r6a7y-4F0A2E.07090507122001@netnews.attbi.com... > In article , > stephen.hill@motorola.com (Steve Hill) wrote: > > > You might actually be surprised at how many tests are needed. In "The > > art of software testing" (Myers, 1979) the 1st chapter starts with a > > quiz.... > > > > What tests would you write for a function that takes 3 numbers (the > > side lengths of a triangle) , and returns whether the triangle is > > equilateral, scalene or isoceles. > > > > I think the answer is over 20.... certainly close on 20 > > > > Steve > > Kent Beck's response to that example: > > http://groups.yahoo.com/group/extremeprogramming/message/37242 > > "The biggest problem is that it doesn't balance the cost and benefits > of tests. He has a triangle example which he writes (I think) 29 > tests for. The test-first version can be done confidently with 5 > tests." It is rather hard to access either your response or Mr Beck's intent. What to you believe? (1) Mr Beck may have read the 29 test cases and concluded that the 5 tests he favors are adequate. (the original 29 hasd redundancy) (2) Mr Beck may have read the 29 test cases and concludes that pruning a number of them was appropriate (impossible situations by virtue of a priori knowledge about other aspects of the system). (Hence he is doing integration testing, rather than unit testing) (3) Mr Beck may have determined that the customer can afford to take the risk because the expected loss associated with the pruned test cases is acceptable. Any other possible alternative explinations for Mr Beck's intet? Which is applicable to your situation?