About test presence

German Morales germanmorales at delta-sys.com
Wed Dec 17 20:42:00 UTC 2003


Hello Stef,

It seems that ducasse wrote:
> Hi SUnit infected and others,
>
> Warning. I would like to have your short and precise point of view on
> the following points. I kept this email as short
> as I can. Please avoid to reply with wonderful ideas that nobody has
> the time nor the energy to develop
> or that is not proven to be useful.

Don't worry.

> Context.
> I think that not showing the tests close to the classes they cover is a
> mistake. I already
> discussed with marcus and we agreed. Basically this is not efficient
> because: the tests are not present
> so people cannot use them as documentation, cannot learn how to write
> tests, cannot feel the need
> to write tests. I get this feeling more and more so I decided to bring
> the issue and I need your feedback.
>
> Idea.
> I would like to have the tests closely related with the class it
> covers. I would like to have the **simplest
> solution** first and see how we can improve it and enforce some
> conventions such as the naming of the class and
> the category. I would like to have the minimal modification to the
> environment (because I know that someone
> has to code it) Basically I would like to have a category (because for
> some cases we may need to have other objects
> and classes created. The idea is not to restrict to Unit tests) with
> the name of the class category and -Test and the
> name for the class name XXTest
>
> Integer in Kernel
> would have its tests if any in IntegerTest in Kernel-Test.

I fail to see why the BrowseUnit package by Romain Robbes doesn't meet
your requirements.

Tests are not only close to the class their tests, but close to the method
they test.

Also, it creates the tests classes, puts them in a category, and even name
the test after the method it tests when needed, all by itself.

Perhaps the convention he uses doesn't match *exactly* what you want, but
I'm almost sure that is more or less as the example you've shown.

> I would like to add in the image the corresponding tests that marcus
> collected and produce a removal script (which is trivial).
> Before doing that I would like to know your point of view.

Put my vote for BrowseUnit, it's just perfect for the task.
And I looove using it.

German Morales




More information about the Squeak-dev mailing list