> When I used it (it might be better now) it required you to make a class to
> do all your testing, rather than just adding static methods, which was a
> rather unnecessary step.
>

No, you still create TestCase classes.  It's hard to see how you have a
test framework in Java that actually called methods inside your classes.
Unless you decided to make every class implement 'Testable'.

In fact, if you wanted to do that now, you could have the classes you
wanted to test implement the junit.framework.Test interface, and the
TestRunner could run them.

The only advantage i can see to having your tests in a separate class, is
you can easily separate the code that you use for testing from the
deployment code.  So your installed software doesn't have all these public
'testme' methods hanging off.

One of the shortcomings of XP for solo developers, i've found, is that
it's designed to be a system for groups of developers.  In particular
where you have some guys that are not as good as the others.  Most of the
practices and tools are ways that the better developers can set up a
framework for the notso good developers to fill in, so they end up being a
little restrictive when you're working on your own.

They're incredibly useful however, when you're leading a team of
inexperienced programmers.  I found that using some of the XP stuff, and
in particular using Junit was a simple way to enforce good OO design
concepts.


 > Lately I've been using the following,
written for Python
(yeah, I know > there's a PyUnit, but I wrote this before that existed) -
>

I've only recently started doing much python, so to date my unit testing
has just been

if __name__ == '__main__':
    _test()

I like your approach though, that's really cool.

-Lkb






_______________________________________________
Bits mailing list
[EMAIL PROTECTED]
http://www.sugoi.org/mailman/listinfo/bits

Reply via email to