ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lkrenz...@web.de
Subject Re: running junit from ant
Date Wed, 11 Jan 2006 15:15:50 GMT
Hi Petar,

the problem is, that I want to execute a JUnit test suite (not only a single test) genereted
by the eclipse wizard, but don't get any output/statistics ... back. As I said I tried it
with different formatters, different versions of the test suite name (with and without package
name, with dots or slashes, with and without '.class' as file type and so on). Also I've read
several tutorials I found somewhere. In all cases either no statistics are generated or sometimes
I get a ClassNotFoundException while the class is in the classpath. Also I'm sure that the
ant task is executed because of some dummy messages I included.

I've just tried it with the 'test'-task instead of 'batchtest' , but with no success.

Could it be a problem that I use log4j for logging ? But the test classes don't use it at
the moment, only assertXXX, fail or exception.printStackTrace(). With the eclipse plugin it
works without any problems.


Thanks, Lothar

"Ant Users List" <user@ant.apache.org> schrieb am 11.01.06 15:32:37:
> 
> On 11/01/06, Lothar Krenzien <lkrenzien@web.de> wrote:
> >
> >
> > Hi Stefan,
> >
> > of course I've tried different formatters, with and without "usefile". But
> > I don't get any output. Only when I use the .class extension in the filename
> > for the TestSuite class I get an ClassNotFoundException, otherwise nothing
> > happens.
> >
> > Thanks, Lothar
> >
> > "Ant Users List" <user@ant.apache.org> schrieb am 11.01.06 06:04:45:
> > >
> > > On Tue, 10 Jan 2006, Lothar Krenzien <lkrenzien@web.de> wrote:
> > >
> > > > When I run a JUnit test suite from ant I would like to see at least
> > > > the result of the tests. At the moment only errors are logged.
> > >
> > > That's what the brief formatter does.  But you should be getting the
> > > summary given your task.
> > >
> > > It sounds as if you wanted to use the plain formatter instead of the
> > > brief one.
> > >
> > > Stefan
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > > For additional commands, e-mail: user-help@ant.apache.org
> > >
> >
> >
> > ______________________________________________________________
> > Verschicken Sie romantische, coole und witzige Bilder per SMS!
> > Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> Hi, I am not quite sure if I understood you correctly but let me write
> these:
> First Stefan is absolutely right - the fornatter nested element has "type"
> attribute, which should be set to one of these: brief(will only generate
> info for the testcases that failed), plain(will generate statistics for all
> the testcases), xml (will generate a xml infos).
> Second - according to the manual:
> "The name of the file is determined by the name of the test and can be set
> by the outfile attribute of <test>."
> So why don't you try this and tell us what happened?
> HTH
> 
> --
> Regards, Petar!
> 


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message