advice on SUnit Tests please

Herbert König herbertkoenig at gmx.net
Sat Apr 16 21:22:15 UTC 2005


Hello Squeakers,

luckily I came across SUnit right in the beginning of my smalltalk
career.

It takes a lot of adjustment to really write tests before the actual
code but it is a nice feeling to just run the tests after each change
and either fit the tests to the changes or extend the tests when the
code breaks but the tests still work.

I read both of Stéphane's papers and the original one but I can't
figure how to do tests for a user interface. Well actually I could
figure it out (start the whole thing as a local variable, send all the
UI messages and inspect the relevant parts of the model).

But this seems a lot of work while testing the UI manually seems
simple.

So please provide some opinions or pointers how to assess if or why or
in which situations it is still wise to go through the work.

And after my recent experience (see my other posting) I'm not quite so
sure if it is really wise to write the tests first. Or is it just that
people think that the tests never get written if they aren't written
in advance?

Actually it was the first time I really wrote the test before the
method that it didn't work out well.

Again any pointers or opinions are welcome and I will not be annoyed
if someone says "You'd just be a fool not to do it in advance".


Best regards,

Herbert                          mailto:herbertkoenig at gmx.net




More information about the Squeak-dev mailing list