You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Anton Vodonosov <An...@beldts.de> on 2007/02/27 17:29:58 UTC

Re: [Junit] How to handle TestSuites correctly

Hi, All.

I want to run many unit tests I have, but without adding 
all them manually to ant script.

The best way for me is using TestSuite, because it gives 
maximum flexibility and simplicity comparing to ant scripts. 
But unfortunately junit task removes original class names of 
classes added to the TestSuite from generated reports. At 
least I not found a way to configure junit task to see names of 
original classes in reports. I would be very appreciative if 
someone helps to do this.

<batchtest> can be considered as an alternative to TestSuites, 
but the only thing I have is a classpath. I can't provide 
<batchtest> neither with <fileset> with .java files, nor
<fileset> with .class files, as in examples in documentation.

>From what I understand from documentation, it is impossible
to create Resource Collection based on classpath. Am I right?

Could someone help in this situation? 

Thanks,
-Anton


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


Re: [Junit] How to handle TestSuites correctly

Posted by Steve Loughran <st...@apache.org>.
Anton Vodonosov wrote:
> Hi, All.
> 
> I want to run many unit tests I have, but without adding 
> all them manually to ant script.
> 
> The best way for me is using TestSuite, because it gives 
> maximum flexibility and simplicity comparing to ant scripts. 
> But unfortunately junit task removes original class names of 
> classes added to the TestSuite from generated reports. At 
> least I not found a way to configure junit task to see names of 
> original classes in reports. I would be very appreciative if 
> someone helps to do this.
> 
> <batchtest> can be considered as an alternative to TestSuites, 
> but the only thing I have is a classpath. I can't provide 
> <batchtest> neither with <fileset> with .java files, nor
> <fileset> with .class files, as in examples in documentation.
> 
> From what I understand from documentation, it is impossible
> to create Resource Collection based on classpath. Am I right?
> 

that's right, because there is nothing in the Java API to enum all 
classes in a package.


 > Could someone help in this situation?

1. unzip the specific jars you want to test against, then create a 
<batchtest> batch from that

2. look at testng, which runs junit 3 tests and is driven by its own xml 
file

-steve

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