Forums Register Login
Ant-junit batch test

When i do a batch test using ant junit task, why do i have to include .java files in my fileset?
You don't. The JUnit batch task uses compiled code (.class or .jar files.)
Hi Jeanne,

I found this in 'JUnit in action' book and also in junit-ant task document. The build code goes like this
Kindly explain.
This example uses .class. I also have a couple working examples with .class. I tried changing one of them to .java and it couldn't find the test. I'm inclined to think the manual has a typo.
Just noticed this is more likely to get a response in the Build forum rather than the Testing one. Moving now.

Thanks for the link. But my code worked perfectly when i used .java files in my fileset.
I'm only going of the Javadoc for the latest version of ANT here and it reads:

"Define a number of tests based on pattern matching.

batchtest collects the included resources from any number of nested Resource Collections. It then generates a test class name for each resource that ends in .java or .class."

see here for details.

Looks like it works for both (using the latest version of ANT)?
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

All times above are in ranch (not your local) time.
The current ranch time is
Oct 16, 2017 22:41:32.