On 3/28/06, Lukas Renggli <renggli@gmail.com> wrote:
The big advantage of this approach is that you already have an
instance of your model, and since this is self you are also able to
directly access the i-vars what can be very useful for some kind of
(internal) tests:

OrderedCollection>>beginOfTest
    <begin>
    self add: 1; add: 2

Point>>test
    <test>
    self assert: lastIndex - firstIndex  = 1.
    self assert: (array includes: 1).
    self assert: (array includes: 2).
    ...

For me isn't a good idea to do "white box" testing.
In the OrderedCollection example given, I don't care how the items are handled in the collection object, and I couldn't find any good reason to make a test like that.
Because if I do a re factoring, maybe I have to modify all the tests written in that way :(

Another idea I saw in a Java testing framework is the possibility to
group-tests, so you can add an annotation like <group: #windows> or
<group: #slow> and the test runner would allows to run (or filter out)
specific groups.

I like the idea of test groups (that's I was trying to say in my previous mail :) ).

But I don't like the idea of having "annotations"... I hate them :P
Because an annotation for me is like an "attribute", it's only data without behavior, but in the system is necessary to take decisions based on this "attribute value".
For example if the "test group" is reified, you can have platform specific tests and skip the tests that doesn't applies to the platform, this decision to skip the test could be made in the test group. (anyway a TestSuite is a "test group", the problem for me is that SUnit builds the "all tests" test suite collecting #allSubclasses of TestCase, maybe if the construction of the "all tests" is a little more "intelligent" we can have "test groups" without adding annotations to the test methods)


I wonder where I can find some documentation about SUnitToo, I am
really interested to see what they did there. I started to play a bit
with the existing framework and see what tools could be useful ...

This is the first time that I heard about SUnitToo... I will take a look, thanks :)

Cheers,
Diego.-