From: Stefan Schmiedl Date: 2001-12-08T18:48:42+09:00 Subject: [ruby-talk:27911] Re: A challenge to proponents of Unit Testing. rmoldskr@online.no (2001-12-08 18:16): > > But doesn't the assumption that the cases are independant break the > black box? How do you know that it's enough to check the three cases > where just one of the sides have illegal values without knowing or > making assumptions about the implementation? well, not even Marvin's brain the size of a planet won't be able to test *all* possible combinations of numbers. you just draw a line somewhere. there is a change of terminology in process over in xp-land. replace unit tests with programmer tests and acceptance test with customer test. so unit tests are written by the programmers who know what they implement. > > But doesn't focusing on testing the specification mean that you might > overlook vagueness in the specification and with that undefined > behaviour in the product? but by writing tests for the specs you often discover the vagueness before writing something you thought the customer implied but did not. > > If nobody realizes that the specification doesn't cover a value that > might arise in a real deployment, then you're not going to discover > that as you are always only testing the by the specification. Or am I > misunderstanding something? yes. you are allowed to apply common sense :-) test first shows its full power when applied together with all of the other xp practices. you just don't sit in a cubicle with a spec binder and translate the words into a test suite all by yourself. you have a whole network of fellow programmers and a customer at hand who you can ask, if a problem arises. Basically, you are not left alone. s. -- Stefan Schmiedl EDV-Beratung, Programmierung, Schulung Loreleystr. 5, 94315 Straubing, Germany Tel. (0 94 21) 74 01 06 Public Key: http://xss.de/stefan.public shhhh ... I can't hear my code!