ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian M. Savage" <jsav...@fisci.com>
Subject Re: [PATCH] JUnitTestRunner.java modification
Date Fri, 10 Nov 2000 10:46:24 GMT
Dirk,

I don't think I stated myself very clearly in my last message, but your
message has enabled me to focus my comments a bit. All our existing test
cases derive from a single class, and my patch makes it possible to only
change that class, plus ant, and not have to go through and make tedious
changes to 160 existing classes which derive from our base test class.

The way that the JUnitTestRunner and the test runners which are part of the
project are implemented makes it almost impossible to change which method is
invoked without overriding a static method.

The choices I could see were:
* modify all my classes to have only one method starting with the string
"text"
* modify all my classes to use JUnit directly. This would be a *lot* of
work.
* modify all my classes to have a static suite() method.
* modify one of my classes, and a few lines of code in the JUnitTestRunner.

I took the last option.

What I'd like to see is the ability to create a single object, and add a
list of methods I want the test suite to invoke. This would provide me with
an evolutionary migration path to using JUnit only. I can see the reasoning
behind doing things the way they are done in JUnit, but they class with our
existing code base. I submitted my patch in the hope that others would
either benefit from it, or point out an easier way for me to do things.

Julian.
----- Original Message -----
From: "Dirk Weigenand" <Dirk.Weigenand@oracle.com>
To: <ant-dev@jakarta.apache.org>
Sent: Friday, November 10, 2000 8:21 PM
Subject: Re: [PATCH] JUnitTestRunner.java modification


> Hello Julian,
>
> "Julian M. Savage" wrote:
> >
>
> >
> > With this in place, I can derive from BaseTestCase, and implement
test(),
> > and be sure that this is the only method which will be called. I need
> > because of the way in which our tests were implemented before we had
heard
> > of JUnit.
> >
> > At least, I think I need it. If anyone can point me to a way to
implement
> > the above without requiring the patch given below, please let me know.
> >
>
> If i understand you correctly you want to invoke only one method per
class.
> JUnit
> looks in the test class for public void methods whose name starts with
'test'.
> If you make sure that there is only one such method in your test classes
it
> will
> the only one to be called.
>
> regards,
> Dirk
> --
> Daddy, what does "format disk c: complete" mean?
> Who is General Failure and why is he reading my disk?


Mime
View raw message