Asking newcomers to make SUnit tests

Marcus Denker denker at iam.unibe.ch
Wed Feb 8 22:40:56 UTC 2006


On 08.02.2006, at 23:02, Peace Jerome wrote:

> [BUG] Complex equality problem
> stéphane ducasse ducasse at iam.unibe.ch
> Wed Feb 8 16:58:32 CET 2006  wrote:
>
>
>> I suggest that you write SUnit tests to document your
> intention and
>> that we can follow what you are doing.
>
> context:
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2006- 
> February/100484.html
>
> Hi stef,
> I want to take issue with this suggestion to a new
> comer. I know you are trying to improve the quality of
> squeak. And I wish that you would think about the
> amount of effort you are calling for and who you are
> asking to shoulder that effort.
>

If you look at the mails of nicolas (that stef was answering to),
than it seems quite clear to me that learning how to write
an SUnit test for testing that bug will not be impossible for him.

> One, using SUnit tests requires learning how. This
> learning curve requires time and personal resources to
> master.  It is not neccessarily the purpose of the one
> who is trying to solve the problem created and left by
> another who did not write a SUnit test. Obviously they
> did not have time to master Sunit tests as well.
>

It is hard to write really good tests, yes. But it is not
hard to write the kind of tests that we are talking about
here: the Complex equality bug.

Tests have multiple purposes, and maybe we should just
name these kinds of tests different: "Bug-showing test"
It was not asked for an exaustive unit-test suite for Complex.

> Secondly, stomping on a bug and writing exhaustive
> tests to prove the bug remains stomped are two
> different efforts.

But isn't having that one test better than having no test at all?

>
> Thirdly, all you really need is a good interactive “am
> I in trouble test.”  Not exhaustive, but a way of
> quickly torturing the problem to see if fails.
> Usually the original symptoms of the bug just need to
> be recreated and tested for.  This is often an
> interactive test and not a SUnit.
>

But not in the case of the Complex zero that we are talking about
gere.

> Fourthly, looking at the results of SUnit tests is so
> boring that some have started writing code to allow
> “ignoring” tests that are known to “fail.  That
> suggests timely bug fixing is more important.
>

Why that? There have been multiple cases in the past
that stuff was fixed only because there was a failing test.

>
> I realize that producing a team would take
> considerable effort on the part of Squeak maintainers.
>  Is that effort worth making? If not, putting the
> burden on the causal bug finder is not justifiable and
> to my sensebilities somewhat obnoxious.
>

The causual bug finder is not asked to write a complete
unit testing collection, just a test showing his bug so that
it's easy to reproduce.
>
> You once warned me that email is a poor way to
> communicate. I realize some of my passions have got
> into this message.

And I really don't understand how you can think that
test as a means for reproducing bugs is a bad idea.

      marcus


More information about the Squeak-dev mailing list