From: Ron Jeffries Date: 2001-12-20T12:48:56+09:00 Subject: [ruby-talk:29063] Re: John Roth dolt ( Re: A challenge to proponents of Unit Testing. ) On 17 Dec 2001 13:18:31 -0800, patrick-may@monmouth.com (Patrick May) wrote: >It sounds like coverage analysis could be an excellent addition to XP >practices. Certainly could be. We all recognize that defects can lurk where the tests don't shine a light. XP as a matter of practice does not specify tools, though all teams have plenty of tools that they use. The focus is on the people, and we are confident that people working together with tight feedback will find the right mix of tools. We recognize that some folks do not trust teams to learn and to be wise, and prefer to specify in great detail what they should do. That's one way. It's just not the XP way. > >The "magical" goal of XP coding techniques is to replace exponential >costs with constant costs. Every idea in the code should be expressed >exactly twice: once in the code, once in the test. Unfortunately, >writing tests is one of the more skillful areas of XP. It's very easy >for programmers trying to change to test-first coding to slip in extra >functionality here and there. Yes, it is. Of course when they do, they tend to get caught by the customer tests and the customers themselves. So wise programmers learn from these mistakes. Certainly some learn more rapidly than others, and some do not learn at all. I suspect these are the same programmers who would have trouble following any other process to good effect as well. > >Coverage analysis could be used as a heuristic (is that the right >word?) test for compliance with "Test First". If the test suite >automatically runs the coverage analysis tool, then you could catch >some of these murky problems before leaning on the untested code. Yes, it could. There is no preponderance of "murky problems" on most projects that I've tracked, but certainly every project can improve. Coverage analysis could be automated and useful. We'll see whether it becomes popular. Regards, Ronald E Jeffries http://www.XProgramming.com http://www.objectmentor.com