¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: testing on the web


 

¿ªÔÆÌåÓý






On Mar 29, 2022, at 2:58 PM, J. B. Rainsberger <me@...> wrote:

On Tue, Mar 29, 2022 at 1:57 PM Russell Gold <russ@...> wrote:
I¡¯ve never heard of the ¡°Mikado method,¡± but that¡¯s pretty much the way I learned to do TDD.

Saff¡¯s technique seems interesting, and I will keep it in mind for the future; I¡¯m not sure yet exactly where it would help. Most of the problems I deal with are errors that wind up being caught in integration testing, because we missed a unit test. There, the problem is that it is not immediately obvious what test is missing, because we haven¡¯t even reproduced the problem other than the integration test: and it doesn¡¯t directly call the production code, so we cannot inline anything useful.

That's _exactly_ what the Saff Squeeze does: it starts with a failing, bigger unit test and produces a missing, smaller unit test. It merely uncovers that test systematically instead of relying on your intuition to imagine it.

But I don¡¯t have a failing unit test. I have a failing integration test (and one that typically takes close to an hour to run through all setup and initialization each time).?


This is why I¡¯d really want some concrete examples.

You don't need them. You already understand it. Go do it the next time you encounter an unexpectedly-failing test and the cause of the failure isn't already obvious.

When I get a failing unit test, I generally just revert the change that caused it and try again. If that¡¯s not practical for some reason, I will try this.
-----------------
Author, HttpUnit <> and SimpleStub <>
Now blogging at <>

Have you listened to Edict Zero <>? If not, you don¡¯t know what you¡¯re missing!

Join [email protected] to automatically receive all group messages.